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


all groups > sql server programming > november 2006 > threads for saturday november 25

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 29 30

Alter Table add column problem
Posted by steve at 11/25/2006 8:48:51 PM
Hi All I need to add some columns to a SQL server 2005 database The following TSQL code returns an error 'incorrect syntax near 'setup devices' if COL_LENGTH('dbo.staff', '[setup devices]') is NULL begin ALTER TABLE dbo.staff ADD [setup devices] bit NULL ALTER TABLE dbo.staff ...more >>

How to Parse XML in a stored procedure
Posted by Charlie NO[at]SPAM CBFC at 11/25/2006 8:44:19 PM
Hi: I would like my stored proc to accept an XML document as a parameter. I know I can do this with new xml data type, but once I have it stored to a local variable, what is best way to parse it so can insert the xml data into tables. Thanks, Charlie ...more >>

Help with WHERE clause
Posted by Dave at 11/25/2006 7:08:56 PM
I have a table that associates cars (vehicle ids) with attributes (color, body style, transmission) and I want to return a list of all cars that have certain attributes (e.g., a black car with manual transmission). The table looks like this... if object_id('tempdb..#attrib') IS NOT NULL D...more >>

MS SQL : How to get adjacent records?
Posted by mylinuxjourney NO[at]SPAM gmail.com at 11/25/2006 6:58:47 PM
Hi, Let's say I have 3 records stored in MS SQL in the following order: ID 4 ID 2 ID 10 I'm doing an classic asp page. This page have a "Prev" and "Next" Button. Assuming that Im viewing this page and it reflects record "ID 2", How am I supposed to retrieve the 2 adjacent records...more >>

Index Tuning Against Restore of Backup
Posted by querylous at 11/25/2006 4:30:01 PM
Is restoring a backup of my current production database to a development server, running index tuning against it with a sample workload, and then applying the recommended changes to the production database a legitimate way to utilize ITS? I don't want to put the load on the production db if I ...more >>

raiserror cariage return line feed
Posted by Robert Bravery at 11/25/2006 2:41:04 PM
HI all, I have a rather long errormessage that I am returning to the client app via raiserror. I would liek to have the errormessage on several line. How do I insert carriage retun and line feeds to the errormessage Thanks Robert ...more >>

Primary Key stops total Update
Posted by Stephen Lynch at 11/25/2006 2:37:29 PM
I'm sure this is simple but I am coming from access and just learning. My table - ManualContribution has a key on EmployeeUID to prevent duplicates. I am trying to go to another table - employees and apend any employees that are not already in the ManualContribution table. But when I run ...more >>

making a grid display
Posted by Andy at 11/25/2006 1:30:10 PM
I have 2 tables. Sites: Site char(3) Zip Char(5) Entity Char(3) Grp Char(3) Shipments: Acct Char(4) I_O_Ind Char(1) Entity Char(3) DestZip Char(5) Originzip Char(5) DetailNbr Char(1) Amt Decimal Sample Data: Sites: 417,77777,200,300 424,48717,300,400 425,11111,400...more >>



Subquery(?) question
Posted by AlBruAn at 11/25/2006 12:10:01 PM
I’ve been having some difficulty trying to create a sproc to sum values in a data table based on the value in another field of the same table. My sproc also needs to be able to output the department name from a second table. Simplifying the data table’s layout (omitting the primary key, ...more >>

querying text data
Posted by Marc at 11/25/2006 11:15:38 AM
I have an application that stores lengthy news articles in a table using the TEXT data type. One of my requirements is to display only the first paragraph of the text in a summary web page. My question, is there a (relatively) easy way to query ONLY the first paragraph of the data from the ...more >>

multiple insertes and insert trigger
Posted by Robert Bravery at 11/25/2006 10:13:56 AM
Hi all, New to SQL programming. I created an insert trigger ALTER TRIGGER [dbo].[PasswordDateupdate] ON [dbo].[lstUser] AFTER INSERT,UPDATE AS BEGIN SET NOCOUNT ON; if update(password) begin update lstuser set passworddatechanged = getdate() end END This works well, except that we g...more >>

kill process question
Posted by Keith G Hicks at 11/25/2006 9:53:51 AM
In EM you can stop a statement from running by clicking the red exclamation mark a second time. You can do the same in QA by clicking the stop button. I also use another 3rd party tool (Database Workbench) for doing development work. This tool does not have a feature where you can stop a query fr...more >>

max degree of parallelism
Posted by Sammy at 11/25/2006 8:58:02 AM
Hi max degree of parallelism is set to 0 o my server which I believe enables all processors to get involved when a large query executes. I have used the MS Script Sp_blocker80 and it shows a big query with waits on CXPACKET. When I looked at performance monitor it shows one processor at 60%...more >>

how to write ....?
Posted by merdaf at 11/25/2006 6:48:39 AM
I am pretty new to sql and i need some help. I have a table with 3 columns: id (int), date (datetime), country (varchar(30)). id and date are primary keys. can u please help me to write this store procedure: input: @id output: the row with the latest date for the given id any help will ...more >>


DevelopmentNow Blog