Posted on: 9/8/2014 5:15:46 AM | Views : 446

SqlConnection con = new SqlConnection(con_str); con.Open();   SqlCommand cmd = new SqlCommand("update t2 set t2.col1=t1.col1, t2.col2=t1.col2, from table1 as t1 join table2 as t2 on t1.cola =t2.cola and t1.colb=t2.colb where t1.colc =t2.colc and t2.colc like '%2014-2015%'", con); int i = cmd.ExecuteNonQuery(); con.Close();   i want it into coding not like the sql query. becos i have to put conditions    when cola colb colc is matching if the col1 and col2 is NULL then  t2.col1=t1.col3, t2.col2=t1.col4   col3 and cold4 will update..    can anyone please help me with this..

Go to the complete details ...