pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-sql@postgresql.org
Subject: select ..... not in .....
Date: Mon, 14 May 2007 16:07:24 +0100
Message-ID: <200705141607.25712.gary.stainburn@ringways.co.uk> (raw)

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     



view thread (2+ messages)  latest in thread

Message-ID: <200705141607.25712.gary.stainburn@ringways.co.uk>
Permalink:  ../200705141607.25712.gary.stainburn@ringways.co.uk/
Also on:    postgresql.org/message-id/200705141607.25712.gary.stainburn@ringways.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gary.stainburn@ringways.co.uk
  Subject: Re: select ..... not in .....
  In-Reply-To: <200705141607.25712.gary.stainburn@ringways.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox