Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
August 2008


all groups > sql server programming > february 2007 > threads for sunday february 18

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

saving result into an excel file from query string
Posted by jack at 2/18/2007 8:19:36 PM
Hi all I want to save the result derived by execution of query or proc into a excel file along with the column name. this can be done by right clicking on the query panel of the result set, But can this be done via query string.. Thanks for answering me.. ...more >>

Which When clause was picked and the value??
Posted by spitapps at 2/18/2007 5:16:38 PM
I have a select statement and I would like to know which when clause(1st set of whens) was fired and the value of the then for further use in my query. I am wondering if this is possibly, and how it would be done. If i try and set a @variable at the beginning of the case statament i get an err...more >>

Question About a Check Constraint
Posted by John Caruthers, Jr. at 2/18/2007 5:04:00 PM
I am attempting to write a Check Constraint on an MSSQL2k server that will only allow a string to be INSERTED or UPDATED if it is formatted correctly. The correct format being, that the first character is uppercase [A-Z], and any trailing characters [a-z] in the word are lowercase, unless the...more >>

Create Table From Stored Procedure Output
Posted by msnews.microsoft.com at 2/18/2007 3:05:30 PM
Hello everyone, please help. I have a stored procedure that returns results that will have varying number of column names. How can I call the stored procedure and save the column names into a new table? The problem with some of the samples online I see, is that they expect you to know the...more >>

Question on Inner Joins
Posted by Bill Gower at 2/18/2007 1:58:13 PM
I need to do a join between the following tables A -> B B -> C A -> D A-> E I know how to do all the joins between A and B and A and D and A and E but how I do insert the join between B and C from A inner join B on A.key = B.key inner D on A.key = D.key inner join E on A.key = E.ke...more >>

How to ALTER sproc if it exists?
Posted by john_c at 2/18/2007 1:14:55 PM
I'd like to ALTER a sproc if it exists and CREATE if it doesn't. Something similar to a table check that will drop the table if it exists but create the table if it doesn't exists. The following syntax isn't correct but gives the idea of what I'd like to do: if exists (select * from dbo.s...more >>

difference between insert into and insert?
Posted by Chris at 2/18/2007 4:35:02 AM
Hi is there a difference between an "insert" statement and an "insert into" statment insert #selected_agents(agentid, profileid) select distinct resourceid, profileid from db_cra.dbo.resource where (active = 1 or dateinactive >= @starttime) and insert into #selected_agents...more >>

insert into table without all data fields?
Posted by Chris at 2/18/2007 4:11:00 AM
Hi, I'm working on modifying a stored procedure used to provide data for a crystal report. The summarized code is as follows: CREATE TABLE #selected_agents ( agentloginid nvarchar(50), agentname nvarchar(50), agentID int, profileid int, resourcegroupid int, resourcegroupnam...more >>



sum a table within a table
Posted by solonzenetzis NO[at]SPAM sbzsystems.com at 2/18/2007 3:47:04 AM
hello I need some help. The following query works perfectly: ------------------------------------------------------------------ select * from tableA, tableB where tableA.num=tableB.order and tableA.num in ( select tableB.order from tableA, tableB where tableB.order=tableA....more >>

large scale data architecture question
Posted by loufuki NO[at]SPAM gmail.com at 2/18/2007 12:13:40 AM
any suggestion on designing a a database that hold large amount of records(hundreds of millions of records) if i have a table says user, that has hundred of millon records. how do I architect the table that it will not affect the searching performance? should I breaks the users into category an...more >>

How to retrieve the value of the autonumber (identity) column after adding and updating a record in ADO-VB?
Posted by Oscar at 2/18/2007 12:00:00 AM
I am trying to retrieve the value of the autonumber field after adding and updating a record to a SQL Server 2005 database. I can't get it working, it always shows the value 'empty'. I've been through a lot of documentation which advises me to use SCOPE_IDENTITY, however since I don't deal wi...more >>

create table, default values
Posted by SOC at 2/18/2007 12:00:00 AM
Hello, I'm trying recreate tables using the script that can be generated using enterprise manager. However the default values of columns are not generated. Can anyone advise how this can be remedied? Thanks Soc. ...more >>

sql server emails
Posted by SOC at 2/18/2007 12:00:00 AM
Hello, I have a stored proc which will send an email (see below). I would like to use a daily scheduled job to check a table, and send emails to the email address field WHERE (the date field is 7 days earlier than the current date AND a status field=0). The status field would be changed to 1....more >>

Statistics (Sql Server 2005)
Posted by Steven Spencer (Spinalogic) at 2/18/2007 12:00:00 AM
When I ran the DETA on a sample trace of queries from our application (I'm hoping I did this correctly: Turn the profiler on the production dbase, capture a sample input set, then run that trace against our test server through the DETA), it told me to place hundreds of statistics onto the ta...more >>


DevelopmentNow Blog