472,133 Members | 1,177 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

How to update one sql table from another table

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
Aug 4 '09 #1
3 3935
ck9663
2,878 Expert 2GB
What do yo have so far?


--- CK
Aug 4 '09 #2
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..
Aug 4 '09 #3
ck9663
2,878 Expert 2GB
I mean on the SQL Server side. What code do you have on your UPDATE part.


--- CK
Aug 4 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

16 posts views Thread by robert | last post: by
18 posts views Thread by Bill Smith | last post: by
3 posts views Thread by rrh | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.