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!

Script with data

Status
Not open for further replies.

netangel

Programmer
Feb 7, 2002
124
PT
Does any one have a script (or some other way) to script the data of the database?

I'll explain better: The enterprise manager scripts the database schema (creates the database, the tables, views, and all the other objects).
I need a way to quickly script the data, in the format:
INSERT INTO MyTable (ID, Name) VALUES (1, 'aaa')

The restore is out of question, because the database already have data on it, and I want to add some more fix tables and data.
An import is also out of question, as I need to send the script to the client, so he can click a button and fill the database with the new data (comming from the script).
NetAngel
 
you could script it yourself with sql

Code:
select 'INSERT INTO MyTable (ID, Name)'
    || ' VALUES ('
    || ID
    || ',''' || Name || ''')'
  from MyTable

rudy
 
I'd like something a bit more 'auto', like running through sysobjects with a cursor and getting every data from all the user tables.

My database has hundreds of tables. It's just not possible to run through them all.

I know I can do a srcipt by myself, but I was just wondering if anyone has it done already.
NetAngel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top