Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Requesting for SQL statement advice - slect/insert

Status
Not open for further replies.

Martincl

Technical User
Jul 11, 2000
1
ZA
HI,<br>I would appreciate advice on how to automate the scripting of table reloads. Our dbas want us to script the loads of tables when moving into semi production and production. <br>This means writing sql to do selects on the tables, but then scripting the necessary inserts statements to do the load on empty tables. My guess is that it is possible to find out which columns are in a table by doing a select <br>on sysobjects and joining to syscolumns on table id.<br>In this way it might be possible to write a select statement that not only formats the correct insert statement, but also gets the correct datavalues too. <br>Has anyone done this perhaps?. I struggling a bit with the sql.<br>regards,<br>Martin<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top