Re: a celko-puzzle from long time ago

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: stig erikson <stigerikson_nospam_(at)yahoo(dot)se>, pgsql-sql(at)postgresql(dot)org
Subject: Re: a celko-puzzle from long time ago
Date: 2006-11-06 19:54:42
Message-ID: 73540.41726.qm@web31808.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2006-11-06 19:59:36 Re: Groups and Roles and Users
Previous Message imad 2006-11-06 19:43:58 Re: Distribution of results