Viewing 15 posts - 42,886 through 42,900 (of 59,063 total)
Jonathan Melo (7/9/2009)
Hi,Here's a way I developed to create dynamic SQL while maintaining some level of readability in the code.
Looks real familiar... especially the part about dynamic and static sections...
http://www.sqlservercentral.com/articles/cross+tab/65048/
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 10:45 pm
Using the test data provided, the following does the trick on the split and the answer number. You can take it from there...
--===== Declare a variable to hold the...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 10:33 pm
Greg Snidow (2/12/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 10:23 pm
vmon (7/8/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 10:16 pm
That's cool... so, are you suggesting a method sort IP addresses that aren't necessarily in the 3 digit byte format?
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 10:07 pm
http://www.sqlservercentral.com/articles/cross+tab/65048/
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:57 pm
Read this to solve the problem of an unknown number of columns.
http://www.sqlservercentral.com/articles/cross+tab/65048/
What I'd like to know is why do you need to denormalize data in such a fashion? Spreadsheet?
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:54 pm
kramaswamy (7/10/2009)
If that's the case, then the approach of updating one record at a time is probably the better one, despite looking ugly.
Ummm... no... not if it's done correctly. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:50 pm
Uh huh... the real question would be, "Why does this type of denormalization need to be done?" 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:39 pm
Heh... seriously...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:36 pm
mysticslayer (7/13/2009)
Well, because SSIS sees it as a varchar.But I found a solution for me as well for SQL2k0, SQL2k5 and SQL2k8.
So this topic can be closed 🙂
Two way street...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:33 pm
T4FF (7/13/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:30 pm
It for the same reason you cannot say ...
SELECT CASE WHEN NULL = NULL THEN 1 ELSE 0 END
... and ever expect to get a "1" unless you mess with...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:26 pm
za34571 ,
You all set or what? 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:22 pm
Uh huh... and what do you do with names like the following?
Mrs. Betty Joe Lynne Van de Horn MD
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:21 pm
Viewing 15 posts - 42,886 through 42,900 (of 59,063 total)