On Tue, 13 May 2003 23:01:29 +0200 "Andreas Cahen" <qube@space.ch> wrote: > Hi there list readers! and wroiters too > I need some hints on an update statement I want to use for my database > and after trying for a while I decided to ask you guys.. > This is the troublemaker: > > > UPDATE details_domains_a SET town_id = 910 WHERE Domain IN (SELECT > domain FROM domains_a WHERE town_id = 910); 3 questions: 1. what DB is it for? Looks like Oralce to me :) 2. What sense can it make updating town_id to 910 on any row that already contains it? 3. what is this 'Domain'? That could actually be your syntax error. > > The error I get: > > You have an error in your SQL syntax near 'SELECT domain > FROM domains_a > WHERE town_id = 910 )' at line 1 > > > The subquery itself, SELECT domain FROM domains_a WHERE town_id = 910, > works fine.. > Any advises, hints or clues?? :) Once again, depends on DB. -- Maxim Maletsky maxim@php.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php