pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: stig erikson <stigerikson_nospam_@yahoo.se>
To: pgsql-sql@postgresql.org
Subject: Re: a celko-puzzle from long time ago
Date: Mon, 6 Nov 2006 11:54:42 -0800 (PST)
Message-ID: <73540.41726.qm@web31808.mail.mud.yahoo.com> (raw)
In-Reply-To: <eilbl4$749$1@floppy.pyrenet.fr>

> While reading celko's SQL puzzles (second edition) i followed a reference to
> http://www.dbmsmag.com/9801d06.html.
> There is a puzzle that counts items in boxes.
> When i try to run the proposed solution on PG 8.1.5, PG says: ERROR:  column reference "qty" is
> ambiguous
> 
> 
> apparently the variable declaration used in the solution is not proper for PostgreSQL. Is there
> a way to solve this puzzle in PostgreSQL?

I believe that qty is a parameter variable that must first be set in psql.  I've seen some thread
in various lists that describe how to set parameter variables before executing a query that uses
them.

Regards,

Richard Broersma Jr.



view thread (3+ messages)  latest in thread

Message-ID: <73540.41726.qm@web31808.mail.mud.yahoo.com>
Permalink:  ../73540.41726.qm@web31808.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/73540.41726.qm@web31808.mail.mud.yahoo.com

 · 

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: rabroersma@yahoo.com, stigerikson_nospam_@yahoo.se
  Subject: Re: a celko-puzzle from long time ago
  In-Reply-To: <73540.41726.qm@web31808.mail.mud.yahoo.com>

* 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