How to update one sql table from another table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arvinder
    New Member
    • Jun 2009
    • 4

    #1

    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,resu lt,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,res ult) if any of the field is NULL then i need to update from table2 otherwise no update.

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


    Thanks
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    What do yo have so far?


    --- CK

    Comment

    • arvinder
      New Member
      • Jun 2009
      • 4

      #3
      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..

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

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


        --- CK

        Comment

        Working...