× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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

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.