Yup...that's my data issue. Should be one and only one...but it's not.

On Feb 5, 2008 11:29 AM, Schmidt, Sebastian
<Sebastian.Schmidt@xxxxxxxxxxxxx> wrote:
Update TableA Set TableAFld1 = (
select TableBFld9 from TableB
where TableAFld2 = TableBFld1)
where TableAFld2 = TableBFld1

Pay attention that the inner select returns exactly one value ;-)

Regards,

Sebastian Schmidt
Abteilung Anwendungsentwicklung

HUK-COBURG
Bahnhofsplatz
96444 Coburg
Telefon 09561 96-2391
Telefax 09561 96-3602
E-Mail Sebastian.Schmidt@xxxxxxxxxxxxx
Internet www.HUK.de
=============================================================
HUK-COBURG Haftpflicht-Unterstützungs-Kasse kraftfahrender Beamter Deutschlands a. G. in Coburg
Reg.-Gericht Coburg HRB 100; St.-Nr. 9212/101/00021
Sitz der Gesellschaft: Bahnhofsplatz, 96444 Coburg
Vorsitzender des Aufsichtsrats: Werner Strohmayr.
Vorstand: Rolf-Peter Hoenen (Sprecher), Wolfgang Flaßhoff, Stefan Gronbach, Klaus-Jürgen Heitmann, Christian Hofer, Dr. Wolfgang Weiler.
=============================================================



-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Michael Ryan
Gesendet: Dienstag, 5. Februar 2008 17:22
An: Midrange Systems Technical Discussion
Betreff: SQL UPDATE from Other File


I'm losing my mind. Can someone give me an example of updating a
column in TableA with a value from TableB where a different column in
TableA matches a value in TableB? I want this:

Update TableA Set TableAFld1 = TableBFld9 where TableAFld2 is in
(select TableBFld8 from TableB)

Can I not do this? Do I have to join the tables instead? If so, how do
I specify an update with a join? TIA...

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

--
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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.