|
-
April 28th, 2009, 01:47 AM
#1
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
-
April 28th, 2009, 07:07 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|