Connecting Tech Pros Worldwide Help | Site Map

How to update one sql table from another table

Newbie
 
Join Date: Jun 2009
Posts: 4
#1: Aug 4 '09
Hi all,

I have 2 tables table1 and table2 both is having same fields name,class,result,email. I will take email as the relational field, now i need to update the date of table1 from table2 condition is i need to check all the field of table1 (name,class,result) if any of the field is NULL then i need to update from table2 otherwise no update.

Can anyone please help me............


Thanks
ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#2: Aug 4 '09

re: How to update one sql table from another table


What do yo have so far?


--- CK
Newbie
 
Join Date: Jun 2009
Posts: 4
#3: Aug 4 '09

re: How to update one sql table from another table


Only 2 tables and a form in c.net. In form i displayed 2 checkbox in front of everyfield one checkbox is "always" and other is "only if NULL" if user select always then it will replace the value of this particular field with othe table value and if user select only if null then the system will check if the value for that particular field is null then it will take the value from second table otherwise it will keep the same value. I have 25 fields in my table and every field is having its own 2 check boxes..
ck9663's Avatar
Expert
 
Join Date: Jun 2007
Posts: 1,925
#4: Aug 4 '09

re: How to update one sql table from another table


I mean on the SQL Server side. What code do you have on your UPDATE part.


--- CK
Reply


Similar Microsoft SQL Server bytes