June 18, 2015 at 10:45 am
ORGINAL QUESTION MOVED TO: http://www.sqlservercentral.com/Forums/Topic1695984-3077-1.aspx
June 18, 2015 at 10:54 am
You have obfuscated the real problem so much that it is really hard to figure out what you are trying to do. Can you post some ddl, sample data and expected results? It doesn't have to be real data but enough that it covers the problem. Please take a few minutes and read the first link in my signature for best practices when posting questions.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
June 18, 2015 at 1:48 pm
Does the real "original" table actually have 5 columns in a manner similar to what your first table is or does it "just" have a "Parent" and "Child" column?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 19, 2015 at 3:08 am
June 19, 2015 at 8:25 am
lewisdow123 (6/19/2015)
Hi,I have reposted in here... http://www.sqlservercentral.com/Forums/Topic1695984-3077-1.aspx
Thanks
You really need to stop multi-threading. You should have posted your corrected data on this thread so that others can see the "development" of both the problem posed and the solution without have to jump to another thread. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply