Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
update table from another table comparing common fields using asp.net code



but not through text entry
SqlConnection connAdd = new SqlConnection("Data Source = localhost; Initial Catalog = project; Integrated Security= SSPI");

connAdd.Open();
string mySQLL;
mySQLL = "Update Report Set handle = 'handled' where caseid='"+lblCID.Text+"'";
SqlCommand cmdAdd = new SqlCommand(mySQLL, connAdd);
cmdAdd.ExecuteNonQuery();

connAdd.Close();


i want to copy data which s already exist in another table..
Posted

1 solution

Try this:
SQL
SELECT column_name(s)
INTO newtable [IN externaldb]
FROM existingtable;
 
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