ohayden
asked on
Store Procedure....
How do I create a stored procedure to copy the contents
of one table (with a where statement on a field) to another
table that already exist and MAY have data in it already that we can't kill?
of one table (with a where statement on a field) to another
table that already exist and MAY have data in it already that we can't kill?
Do the tables have the same format?
Something like that:
INSERT INTO tab1
SELECT c1,c2,c3 FROM tab2 -- select only those columns that will match the columns of the first table
WHERE c1 = 'NY' -- any condition
If that's notwhat you meant, please rephrase your question
(as someone noticed, a well asked question already contains 1/2 of answer :)
INSERT INTO tab1
SELECT c1,c2,c3 FROM tab2 -- select only those columns that will match the columns of the first table
WHERE c1 = 'NY' -- any condition
If that's notwhat you meant, please rephrase your question
(as someone noticed, a well asked question already contains 1/2 of answer :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I already solved the problem but your answer was exactly how I did it, so even though I did use your answer the points are yours..... thanks.