473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

selecting more that 2 tables based on 1 subquery find an error (revision)

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@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@patrix:~>

Anybody could give me any solution?

Thank you very much in advance.


__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
1 973
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@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@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
Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
2
by: Zaphod | last post by:
I have a table with 5 fields, of which several sometimes have duplicates. example; | id | item | day | hour | ip_address | | 1 | 3 | 2 | 11 | 204.156.33.78 | | 2 | 7 | 2 ...
2
by: calan | last post by:
Having a brainfart.... I need a query that returns a record count, based on two distinct fields. For example: Order Revision Customer 001 1 Bob...
57
by: Bing Wu | last post by:
Hi all, I am running a database containing large datasets: frames: 20 thousand rows, coordinates: 170 million row. The database has been implemented with: IBM DB2 v8.1
3
by: Larry R Harrison Jr | last post by:
I have an Access 97 database with 2 tables, parent one called tblDocuments and child one named tblRevisions. They are linked with DocID in both tables. In the revisions table a given DocID can...
4
by: Lauren Quantrell | last post by:
In my old MDB databases, I constructed a lot of "subQueries" to filter out records, then based a new query on the subQuery. This results in huge speed increases on large datasets. However... In...
4
by: Sami | last post by:
I hope someone will tell me how to do this without having to do any VB as I know nothing in that area. I am a rank beginner in using Access. I have created a database consisting of student...
0
by: Prabu Subroto | last post by:
Dear my friends... 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. ...
1
by: MRGRIM | last post by:
Hello I'm trying to solve a problem but I'm not having much luck so suggestions on a work around or fixes would be most appreciated. I am trying to run a select statement on a data table that will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.