From: | "Kapil Tilwani" <karan_pg_2(at)yahoo(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | |
Date: | 2001-05-28 11:26:37 |
Message-ID: | 001f01c0e812$33a54b60$1300a8c0@kapil1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
Hi,
I have two tables purchasemaster (Master) and ItemMaster (child) linked through TransactionID
I have a query like
select * from purchasemaster where transactionid in (select transactionid from itemmaster where itempriority = 2)
****I need this query for MS-Access, MS-SQL and Postgres. Because the application is supposed to be such that for upto 2-3 users, the application would be running on MS-Access or MSDE, while for heavier databases i.e., greater than 4 , the ideal database would be Postgres
Only the problem is ... (correct me if i am wrong, PLEEEEEEEEEEEASE) that for each tuple in purchasemaster the sub-query is re-evaluated (True or False????). What I am looking at is whether it is possible to execute the query in the sub-query just once, get its value as in "(1,2,5,23,7,90)", etc. in place of the sub-query and accordingly, execute the main query.
Thank you,
Kapil
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2001-05-28 12:34:41 | FW: arrays in oracle? |
Previous Message | Einar Karttunen | 2001-05-28 11:13:10 | Re: Unique value over different servers |
From | Date | Subject | |
---|---|---|---|
Next Message | Kapil Tilwani | 2001-05-28 11:27:09 | Query Optimisation required |
Previous Message | Vladislav Breus | 2001-05-28 10:14:44 | sql user management |