From: | Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | select ..... not in ..... |
Date: | 2007-05-14 15:07:24 |
Message-ID: | 200705141607.25712.gary.stainburn@ringways.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
I folks.
I'm struggling with a select which should be easy.
select v_d_code, v_o_number, v_vin, v_status from vista_details where
v_d_code='64340' and v_o_number='C0023';
v_d_code | v_o_number | v_vin | v_status
----------+------------+-------------+-------------
64340 | C0023 | GCDW7D37645 | COMPOUND IN
(1 row)
shows that the record exists in vista.
select w_vin from walon where substring(w_vin from '(.{11}$)')
= 'GCDW7D37645';
w_vin
-------
(0 rows)
shows that it doesn't exist in walon.
So, who does this select not return the row?
select v_d_code, v_o_number, v_vin, v_status from vista_details where v_vin
not in (
goole(# select substring(w_vin from '(.{11}$)') from walon);
v_d_code | v_o_number | v_vin | v_status
----------+------------+-------+----------
(0 rows)
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-14 15:37:37 | Re: select ..... not in ..... |
Previous Message | singh.srajendra | 2007-05-14 12:36:25 | ignoring primary key violations in COPY command |