If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysql nested subquery problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-04, 02:24
hary_g hary_g is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
mysql nested subquery problem

i have a query in mssql server 7.0 which is working fine but i want to rewrite the query for mysql 5.0 or mysql 4.01 (as running the same query in mysql 4.01 or 5.0 versions just hangs the system)..the query is..

SELECT DISTINCT name, city1, cey.cey_id FROM cey, ceycomdet WHERE cey.cey_id = ceycomdet.cey_id AND subey_id LIKE 'c%' AND cey.cey_id IN (SELECT cey_id FROM CEYP WHERE psubcn_id = '$psubc2_id' UNION SELECT ceylo_id FROM CEYPNR WHERE cey_id IN (SELECT cey_id FROM CEYP WHERE psubcn_id ='$psubc2_id')) ORDER BY city1, name

pl. help me as i have failed to rewrite query using joins etc.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On