CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2001
    Posts
    254

    inner join update

    i've used inner join to join 2 tables Table_A and Table_B, when I tried to update field only found in Table_A my application crashes.

    is it possible to update flds whe two tables are joined ?

    please advise

    thanks
    cyrus

  2. #2
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: inner join update

    No you cannot, but you can do things like:

    Code:
    Update Fred Set 
    col1 = (select t1.col1 from Table1 t1 join Table2 t2 on t1.key = t2.key where t1.key = mykey),
    col2 = (select t2.col1 from Table1 t1 join Table2 t2 on t1.key = t2.key where t1.key = mykey)
    WHERE Mainkey = myKey
    etc.
    If you find my answers helpful, dont forget to rate me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured