pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Olbersen <dave@slickness.org>
To: pgsql-sql@postgresql.org
Subject: Re: SQL Join - MySQL/PostgreSQL difference?
Date: Mon, 5 Feb 2001 16:16:11 -0800 (PST)
Message-ID: <Pine.LNX.4.31.0102051612080.22396-100000@bubbles.electricutopia.net> (raw)
In-Reply-To: <3A799543.F4AC1E35@webprojkt.com>

On Thu, 1 Feb 2001, Brice Ruth wrote:

->SELECT
->  a.Number,
->  a.Code,
->  a.Text
->FROM
->  b,
->  a
->WHERE
->  (b.Id = a.Id) AND

These next two statements are very ambiguous. Make them explicit as you have
with "(b.Id = a.Id)" and "(b.d_Id = 'key3')"

Also, be sure that 'key3' is how what you want looks in the database

->  (VersionId = 'key1') AND
->  (Category = 'key2') AND
->  (b.d_Id = 'key3')
->ORDER BY
->  a.Number;

Also, make sure ( '\d b' ) that your columns are case-sensatively named 'Id' and
such as this does matter.

-- Dave






view thread (29+ messages)  latest in thread

Message-ID: <Pine.LNX.4.31.0102051612080.22396-100000@bubbles.electricutopia.net>
Permalink:  ../Pine.LNX.4.31.0102051612080.22396-100000@bubbles.electricutopia.net/
Also on:    postgresql.org/message-id/Pine.LNX.4.31.0102051612080.22396-100000@bubbles.electricutopia.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dave@slickness.org
  Subject: Re: SQL Join - MySQL/PostgreSQL difference?
  In-Reply-To: <Pine.LNX.4.31.0102051612080.22396-100000@bubbles.electricutopia.net>
  References: <3A799543.F4AC1E35@webprojkt.com> <Pine.LNX.4.31.0102051612080.22396-100000@bubbles.electricutopia.net>

* 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