Re: [SQL] Unable to get UPDATE ... FROM syntax correct

2010-02-19 Thread Gordon Ross
On 19/02/2010 10:36, "Richard Huxton" wrote: > Works here - are you sure you don't have any triggers interfering? Doh ! *blush* Yes, I did, to stop anyone tampering with the audit table ;-) Thanks for that. GTG -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes t

Re: [SQL] Unable to get UPDATE ... FROM syntax correct

2010-02-19 Thread Gordon Ross
On 19/02/2010 10:28, "zkn" wrote: > update audit set key = (select extension.number from extension where > audit.record_id = extension_id) No joy, I still get "UPDATE 0" :-( GTG -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.pos

[SQL] Unable to get UPDATE ... FROM syntax correct

2010-02-19 Thread Gordon Ross
I have two tables: Table "public.audit" Column |Type | Modifiers +--+--- id | integer | (serial) record_id | integer | not null key| character varying| (...) Table

[SQL] Make a column case insensitive

2004-08-06 Thread Gordon Ross
Is it possible to make a column case insensitive, without having to pepper your SELECTs with lots of lower() function calls (and forgetting to do it at times !) (I'm on 7.4.3) Thanks, GTG Gordon Ross, Network Manager/Rheolwr Rhydwaith Countryside Council for Wales/Cyngor Cefn Gwlad

[SQL] Determining Inheritance

2003-10-01 Thread Gordon Ross
blah; how can I tell which table (either SUBTABLE1 or SUBTABLE2) a row comes from ? Do I need to add an extra column to BASE to specify which table a row really belongs to ? (If it helps or hinders, I am ultimately going to be doing this via JDBC) Thanks, GTG Gordon Ross, Network Manager/Rheolwr