SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

sravan.here
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.

ID SID DOB
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?

Lamprey
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  
 New 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.05 seconds. Powered By: Snitz Forums 2000