Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I want to copy data from one table to another table.

I am using this querry-

SQL
insert into sheetdocument(ActivityID) select activityID from tablesheetold where projectid = 125


its shows 100 rows affected but there is no up dation in sheetdocument table.


Thanks in Advance.
Please help me .
Posted
Updated 22-May-12 23:56pm
v4
Comments
sagar wasule 23-May-12 6:35am    
http://www.w3schools.com/Sql/sql_select_into.asp

Chk this link ... reply if this was useful for u

If the statement returns that it has inserted 100 rows, check the row count. If it is 100 but you don't see the data then you could have a data type conversion problem.

Also check that this isn't either done in an uncommitted transaction (no other connection would see the data until it's committed) or that you don't rollback the transaction anywhere.
 
Share this answer
 
Check the datatype for ActivityID in both the table, whether it matches.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900