|
If my understanding is correct, then the following SQL statement could be the solution for your query. update Tbluserpt set tbluserpt.oboprce = tbluserpt.ifoth/(1-(tblusrp.okmark)) where tbluserpt.oboprce = 0 and tbluserpt.obdiv||tbluserpt.obcls in (Select tblusrp.obdiv||tblusrp.obclsfrom Tblusrp) Thanks, Alex. On 6/27/06, Timothy Ellifritz <tim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
SQL question. I have the pieces and I think the answer is in front of me
but can't figure this one out.
I know I can't do an update on a join but I was wondering if one could
be used in a subselect somehow to accomplish this.
I have 2 temp tables...
Tbluserpt
oboprce
ifoth
obdiv
obcls
Tblusrp
obdiv
obcls
okmark
How do I write a statement to...
Where tbluserpt.oboprce = 0
I want to update it to tbluserpt.ifoth/(1-(tblusrp.okmark))
For the update I need to select tblusrp.okmark
Where
tbluserpt.obdiv = tblusrp.obdiv
And
tbluserpt.obcls = tblusrp.obcls
Hope the question is clear.
Thanks,
Tim
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.