> update adla1 set PFLOPF=(SELECT pflopf from adl where adla1.ref=adl.ref) 
> where select count(adl.ref) from adl=1;

A bit optimized version...

UPDATE adla1 
SET pflopf = (SELECT pflopf FROM adl WHERE adl.ref = adla1.ref) 
WHERE (SELECT COUNT(*) FROM (SELECT 1 FROM adl WHERE adl.ref = adla1.ref LIMIT 
2)) = 1;

Don't know your structure of database, but I advice you to use 'FOREIGN KEY's.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to