Re: selecting more that 2 tables based on 1 subquery find an error

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Prabu Subroto <prabu_subroto(at)yahoo(dot)com>
Subject: Re: selecting more that 2 tables based on 1 subquery find an error
Date: 2004-07-26 12:37:58
Message-ID: 4104FB26.1020905@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Prabu Subroto wrote:

> Dear my friends...
>
> I am using SuSE 9.1 and postgres.
>
> I want to "select" query 2 tables. one is "customer"
> and one is "customer.description" but the customer
> records that I want to "select" are only what in
> subquery result.
>
> Here what I've done:
>
> postgres(at)patrix:~> psql kv
> Welcome to psql 7.4.2, the PostgreSQL interactive
> terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help on internal slash commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> kv=# select c.custid, cd.description, c.company,
> c.title, c.salutation, c.firstname, c.lastname,
> c.address, c.postcode, c.city, c.areacode, c.phone,
> c.mobilephone, c.fax, c.email from customer as c,
> customerdescription as cd where c.custid in (select
> custid from sven1);
>
> Terminated
> postgres(at)patrix:~>
>
> Anybody could give me any solution?

You are running out of your resources I believe.
You forgot the join between customer and customerdescription.

Regards
Gaetano Mendola

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2004-07-26 13:45:25 Re: Sql injection attacks
Previous Message Prabu Subroto 2004-07-26 11:41:02 selecting more that 2 tables based on 1 subquery find an error (revision)