Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help Needed...with Dynamic table creation
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic
Starting Member

4 Posts

Posted - 04/18/2013 :  19:13:01  Show Profile  Reply with Quote
Have a Table with the CSV Values in the columns as below

ID Name text
1 SID,DOB 123,12/01/1990
2 City,State,Zip NewYork,NewYork,01234
3 SID,DOB 456,12/21/1990

What i need is to get is 2 tables in this scenario as out put with the corresponding values , These table should be generated Dynamically as the values in the source table varies every week.

1 123 12/01/1990
3 456 12/21/1990

ID City State Zip
2 NewYork NewYork 01234

Is there any way of achieving it using a Cursor/Procedure or any other method in SQL server?

Flowing Fount of Yak Knowledge

4614 Posts

Posted - 04/18/2013 :  20:00:07  Show Profile  Reply with Quote
Would you mind explaining what you are trying to achomplish?

Of course, just about anything CAN be done. But, just because can dosn't mean it should. Perhaps, it might make more sense to use Entity-Attribute-Value (EAV) pattern? I admit I'm not a huge fan of EAV, but I suspect it'll be better then trying to dynamically create tables will get you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000