Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread sql syntax error
Fri, May 12 2006 9:49 AMPermanent Link

"cam"
Dbisam 3.27

what is wrong ?
two table "chiamate" and "clienti"
I need update chiamate.citta from clienti.citta value
Every "chiamate" have one and only one record in "clienti" table

Dbisam engine error # 11949 SQL error: right parenthesis expected, instead found 'clienti' in value expression


update chiamate
SET citta = (select clienti.citta
                 from clienti
                 where clienti.codice=chiamate.cliente )
WHERE citta = null

Thanks

cam


Fri, May 12 2006 10:31 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

cam


You need to use a join - check the manual or in these newsgroups - I remember a similar posting within the last month.

Roy Lambert
Fri, May 12 2006 4:02 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Cam,

Use this instead:

UPDATE chiamate SET citta = clienti.citta
FROM chiamate INNER JOIN clienti ON clienti.codice=chiamate.cliente
WHERE citta = null

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, May 15 2006 3:41 AMPermanent Link

"cam"


--

"Tim Young [Elevate Software]" >
> Use this instead:
>
> UPDATE chiamate SET citta = clienti.citta
> FROM chiamate INNER JOIN clienti ON clienti.codice=chiamate.cliente
> WHERE citta = null
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
>

Hi Tim
Thank you
is very fine ! All OK !!!

cam

Image