Re: SQL statement

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Wed, 31 Oct 2001 00:44:07 GMT
Message-ID: <rPHD7.1904$Fm5.1211947_at_news1.sttln1.wa.home.com>


update tableA A set colA2='A' where exists (select 1 from tableB b where b.colB1=A.colA1 and b.colB2 like 'A%');

"Stjepan Brbot" <Stjepan.Brbot_at_ZG.HiNet.HR> wrote in message news:9rn7uo$57b9$4_at_as201.hinet.hr...
> 1) I have two tables: tableA,tableB
> 2) tableA has columns: colA1,colA2; tableB has columns: colB1,colB2
> 3) realtion tableA.colA1=tableB.ColB1
>
> I want to set colA2 to zero of every row if i.e. it's corresponding
> colB2 begins with letter 'A'
>
> What is the SQL statement?
>
> --
>
> Stjepan Brbot [Stjepan.Brbot_at_ZG.HiNet.HR]
>
>
>
Received on Wed Oct 31 2001 - 01:44:07 CET

Original text of this message