Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insert into - function

Author  Topic 

slimt_slimt
Aged Yak Warrior

746 Posts

Posted - 2008-11-04 : 02:39:37
Hi,

before going to write procedure - i just want to check with you if it already exists; so i don't reinvent the wheel :)

procedure would read data from a table and create text:

INSERT INTO table1
SELECT 12,'JOHN' UNION ALL
SELECT 13,'JEFF' UNION ALL
SELECT 15,'ANN'


where exists table1 columns (ID, NAME).

so it's reverse idea of writing insert into statements, i would generate this text on existing table with data.

:-)

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-11-04 : 02:47:43
This is an approach:
http://www.codeproject.com/KB/database/InsertGeneratorPack.aspx

Webfred


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -