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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Good T SQL stored procedure tutorial?

Status
Not open for further replies.

bastienk

Programmer
Joined
Mar 3, 2004
Messages
326
Location
CA
Hi All,

Overview: I am trying to automate remote admin on a db. I have a dev db where tables are added/altered etc. I need to sync the structures. So I create a text file with the templated structure and load that to a table. I then want to run a sql query to load another table with the current stucture, compare them and generate the appropriate sql (ceate table, alter table) to duplicate the structure...

I am to write a stored procedure where I load a file via Bulk Insert(ok there), then I am trying to run a query that returns a bunch of records and I am not sure how to handle the resultset. I need some pointers on how to move thru the resultset...

If someone knows of a good tutorial with this type of functionality, could you point me to it?

TIA


Bastien

Cat, the other other white meat
 
You may want to look into a DTS package for the project you are describing. Without knowing the "exact" manipulations, executions and building of tables, it is hard to give tips on design methods.

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top