Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I have to create a big long view! This will contain about 150 columns. (nightmare)

 

The thing is, these fields already exist in another table as values e.g. a1,a2,a3 etc.

 

 

Instead of me writing a script to manually create the view with fields - id, a1,a2,a3, etc. i was thinking of trying a script that will pull the values from the lookup table and write them in the view as field names.

 

I am starting it now, but if anyone has any pointers on how to construct it, please let me know.

 

 

thanks

Posted
If you're using SQL Server, you can use Enterprise Manager to create the view graphically w/o your having to type anything. You can also script SELECT statements (among others) in Query Analyzer. Just pop up the Object Browser from the Tools menu, then select the table(s) in the Object Browser pane, right-click and select Script Object to New Window as Select. This won't create the view automatically but at least the field names gets scripted and saves you a lot of typing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...