Viewing 15 posts - 50,971 through 50,985 (of 59,091 total)
What is the primary key of the matrix? Also, not that we'll necessarily need it, but can Dynamic SQL be used?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 3:31 pm
GSquared (4/25/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 7:58 am
MarkusB (4/25/2008)
In order to work correctly, you must surround the source and target with the delimiters in the column... in this case, spaces.
[font="Courier New"]SELECT myvarcharCol from mytable
WHERE ' '+myvarcharCol+' '...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 7:56 am
I use this one often...
[font="Courier New"]...
...
WHERE (@A = AColumn OR @A IS NULL)
AND (@B = BColumn OR @b-2 IS NULL)
AND...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 7:47 am
Try this... it's Adrian's original code with some conditions added...
SELECT LEFT(raw_payload, CHARINDEX('+', raw_payload, 1)-1),
...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 7:41 am
Gus,
This is an SQL Server 2000 forum... 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 7:29 am
Adrian... take a look at the original post... the first entry in the data looks like 'S2009+' which means that you'll get invalid substring messages for the 2 and 3rd...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 7:03 am
karthikeyan (4/25/2008)
I am also thought to use WHILE LOOP.Adrian, do you think is there any performance wise difference between using CURSOR and WHILE loop ?
Please share your thoughts.
Cursor (with...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 7:00 am
karthikeyan (4/25/2008)
Adrian,You are correct. But i don't have the permission to create functions. Can you provide some other alternate ways ?
You could either ask for the privs or get the...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 6:57 am
MarkusB (4/25/2008)
The most simple option would be using LIKESELECT myvarcharCol from mytable
WHERE myvarcharCol LIKE '%project%'
Another option would be using the PATINDEX function
SELECT myvarcharCol from mytable
WHERE PATINDEX('project',myvarcharCol) > 0
Try either of...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 6:55 am
Gary,
The spaces you're getting is probably because of the data or datatype... For example, are you using CHAR or VARCHAR in the existing table? Are there trailing spaces in...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 6:34 am
rbarryyoung (4/24/2008)
Jeff Moden (4/24/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 6:26 am
I agree that there're a lot of things, like this conversion, that should be done in the GUI instead of SQL Server. Displaying commas in dollar amounts and formatting...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 25, 2008 at 6:20 am
I'm sorry... my bad... not enough coffee. I thought you wanted to know what the "N" was (as most frequetly do) and didn't read the rest of the WHERE...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 24, 2008 at 7:47 am
My appologies... I missed the fact that this is for display purposes...
You don't need a TempTable nor any form of dynamic SQL for this in SQL 2005... this will do...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 24, 2008 at 7:35 am
Viewing 15 posts - 50,971 through 50,985 (of 59,091 total)