Viewing 15 posts - 42,931 through 42,945 (of 59,102 total)
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
Karthik,
There is nothing in that data nor in the table to establish the order of the rows. You know you cannot rely on such a thing as the "natural...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:11 pm
So, Jamie... now you have 3 tables to maintain instead of just 2. The real problem is this table...
MakeID Make CategoryIDs
1 Dell 1,2,3
2 Sony 1,2
It's not normalized. Tables...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:03 pm
srathna77 (7/17/2009)
Can you please let me know how to do in batch process.
Did any of that work for you?
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 9:00 pm
J-F,
Did you ever figure out how to do this?
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 8:52 pm
lopes80andre (7/16/2009)
Lowell (7/16/2009)
after you've done the DECLARE @acumul_error varchar(100) or whatever it is, you need to initialize it as an empty string:
SET @acumul_error...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 8:44 pm
kevinwinters (7/14/2009)
*every* row of that field is null, I am trying to make every row of that field blank so I can concatenate the field...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 19, 2009 at 8:39 pm
Viewing 15 posts - 42,931 through 42,945 (of 59,102 total)