pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christof Glaser <gcg@gl.aser.de>
To: olle.wijk@systecon.se
To: pgsql-sql@postgresql.org
Subject: Re: How do I extract ONE particular field, when multiple table contain the same field name?
Date: Fri, 14 Sep 2001 23:05:21 +0200
Message-ID: <20010914211433.26D8112BF8@pinguin.gl.aser.de> (raw)
In-Reply-To: <6baa8767.0109120106.67f94cf5@posting.google.com>
References: <6baa8767.0109120106.67f94cf5@posting.google.com>

On Wednesday, 12. September 2001 11:06, Olle Wijk wrote:
> Hi,
>
> I am pretty new att using SQL-quires, could anyone help me with this
> one:
>
> I want to do the following SQL-query:
>
> Select XID, DENOM, PRICE, FRT, CTID From XItem xi, Category c Where
> xi.System=1 and xi.Category=c.Index
>
> the problem is that the field 'DENOM' is present in both table 'XItem'
> and 'Category' 

Just write: table.field or table-alias.field instead of just 'field' 
(like you did already in the WHERE clause):

Select XID, xi.DENOM, PRICE, FRT, CTID 
From XItem xi, Category c 
Where xi.System=1 and xi.Category=c.Index

Christof
-- 
	  gl.aser . software engineering . internet service
       http://gl.aser.de/ . Planckstraße 7 . D-39104 Magdeburg



view thread (6+ messages)  latest in thread

Message-ID: <20010914211433.26D8112BF8@pinguin.gl.aser.de>
Permalink:  ../20010914211433.26D8112BF8@pinguin.gl.aser.de/
Also on:    postgresql.org/message-id/20010914211433.26D8112BF8@pinguin.gl.aser.de

 · 

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: gcg@gl.aser.de, olle.wijk@systecon.se
  Subject: Re: How do I extract ONE particular field, when multiple table contain the same field name?
  In-Reply-To: <20010914211433.26D8112BF8@pinguin.gl.aser.de>

* 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