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 > march 2006 > threads for sunday march 19

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 31

function problem, referring to another function
Posted by mrmagoo at 3/19/2006 10:47:17 PM
I'm trying to create a couple of functions and am running into a problem that I cannot explain. This uses Northwind database. First of all, this one works: ------------------------------------------- ALTER FUNCTION fnCustomers ( @Initial VARCHAR(1) ) RETURNS @Cust TABLE ( C...more >>

char to integer ?
Posted by Agnes at 3/19/2006 10:16:59 PM
Does anyone know how can i change the character into interger ? like "1" ->> 1 thanks ...more >>

Inverse -- Reverse
Posted by doller at 3/19/2006 9:03:55 PM
Hi, I am not able to slove my problem so guys i need ur help. i had (thousands) of records in my database in this manner. Name Id DFDDABBF-7079-4135-AAD8-1BDA58DB0CEB Now i need the Nameid like below BFABDDDF-7970-3541-AAD8-1BDA58DB0CEB I need changes till 18 character started...more >>

Any query to return the execution time for another query?
Posted by Pradeep at 3/19/2006 4:41:36 PM
Hi, I prefer a query. Otherwise, a stored procedure will do. Thank you in advance for enlightening me. Pradeep ...more >>

Stored Procedure to return multiple rows in one field
Posted by Jason at 3/19/2006 4:30:07 PM
Hello again, all, I have absolutely no idea where to start on this one. I need to work with three tables: a Contact table, a ContactPhoneNumber table, and a PhoneNumber table. The ContactPhoneNumber table is (obviously) the relationship table for a many-to-many relationship between Contact a...more >>

rename file using cmdexec in SQL Server Agent job.
Posted by Meher at 3/19/2006 4:15:02 PM
Hi: I am using the cmdexec step in the SQL Server agent to rename a file. Below is the command I use to rename the file in the step. ren c:\test1.bak test2.bak However when I run the job the job fails with the following error. The process could not be created for step 1 of job 0xDD57...more >>

transactions and error handling
Posted by Keith G Hicks at 3/19/2006 4:07:31 PM
I'm reposting this because it ended up the first time under someone else's post. I should have used a diffrent subject but didnt' think to do that. So here it is again. Also, I do have the links to http://www.sommarskog.se/error-handling-I.html and http://www.sommarskog.se/error-handling-II.html...more >>

Design problem
Posted by Grabi at 3/19/2006 3:27:41 PM
Hello. I'm using SQL2000, and I have a design problem. I know that every time I make a primary key, sql server makes it by default a clustered index. Since I have a large composite key in the table I don't know if it's smart to leave it as a clustered index. This is the table: CREATE TABLE [...more >>



Update rows as they are inserted.
Posted by JimBuch at 3/19/2006 3:18:26 PM
Hi, I have the following table: CREATE TABLE [dbo].[testtab] ( [Customer] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [RecID] [bigint] NOT NULL , [PrevAction] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [CurrAction] [char] (5) COLLATE SQL_Latin1_General_CP1_...more >>

Stored procedure not executing in the order of the TSQL
Posted by John230873 at 3/19/2006 2:55:22 PM
In this procedure we need the first insert to be completely finished before the second insert is started, we believe in some cases the second statement is executing before the first is completed. CREATE procedure [exinv].[PROCESS_T5] (@CONTAINERID VARCHAR(15), @TNTNUMBER VARCHAR(15), @ORD...more >>

SQL Server Stored Procedure & Nested Query Syntax
Posted by Jason at 3/19/2006 11:44:22 AM
Hello all, I'm relatively new to SQL stored procedures and nested SQL statements. I'm trying to do something rather simple, but I'm struggling with it a bit. I have a table called "contact" with a FirstName, MiddleName, and LastName column, all of which allow nulls. I want to create an sp ...more >>

Cannot delete rows that contain same data
Posted by Bob and Sharon Hiller at 3/19/2006 11:18:51 AM
Using SQL Sever 2005 Management Studio I am trying to delete rows that are duplicated in a table. There is no Primary Key. I get an error message to the effect that the rows cannot be deleted because it would effect other rows. If I attempt to change a field in the row I get the same error. In...more >>

It’s_the_little_things!
Posted by Logger at 3/19/2006 8:03:57 AM
Help with what I hope is a quick fix. How do you set a value within a varchar string? For example: I want to set the 3rd position to a '-' Declare @x int Set @x=3 SET SUBSTRING(@phone,@x,1)='-' I keep getting the following error on set substring statement: Incorrect syntax near '('. ...more >>

error handling
Posted by Keith G Hicks at 3/19/2006 12:00:00 AM
I'm trying to get a handle on error handling and transactions in sql 2k. If something causes an erorr, I'd like to get at it in the front end via @RETURN_VALUE (ADO in Delphi) and if no errors occur I'd like to use my output parameter to tell the user how many rows were affected. For now, I need...more >>

Display estimated execution plan bug
Posted by Grabi at 3/19/2006 12:00:00 AM
Hello. I'm using SQL2000, and I have a problem. Each time I try to display estimated execution plan in Query Analyzer, the graphical plan shows optimization costs 0%, 100%, or 600%, and the cost is shown only for the first step. I installed sp4, but that didn't change anything. I know I can use ...more >>

**changing the logical name**
Posted by R-M at 3/19/2006 12:00:00 AM
Hi In SQL 2000, How can I change the logical name of a database? Any help would be greatly appreciated....more >>


DevelopmentNow Blog