Viewing 3 posts - 1 through 3 (of 3 total)
SET @myVar = 'A'
INSERT INTO myTbl (col1) VALUES (CASE WHEN @myVar = 'A' THEN 'AA' ELSE 'BB' END )
CPU: 0 Reads: 20 Writes: 0 Duration: 0
I have made little change here ie....
May 16, 2007 at 12:18 am
#706668
Tell me whether InvoiceNumber is diff. for credits(-ve values) and debits(+ve). If this is case then is very simple....
September 14, 2006 at 1:42 am
#660304
You can also check for existing of database using following sql statement
SELECT NAME FROM SYSDATABASES WHERE NAME='databasename'
May 2, 2006 at 7:59 am
#635303