MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 4th, 2004, 04:15 PM
kevinklein kevinklein is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 kevinklein User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Problem porting select code from SQL server to MySQL

I am trying to port SQL server data to MySQL but when I try to do this query
the system goes on and on and on and doesn't actually produce anything. I'm
new to MySQL so any help would be appreciated.

table1 - table1a - table1a1
\ \
table1b table1a2

While testing for the problem I found that if I left tables 1a1 and 1a2 out that
the query worked.

Here is the query string

SELECT JI.entity_id AS JobRecord, JI.file_number,
JI.client_number, Companies.client_name,
JI.client_reference, JI.street_number,
JI.street_name, JP.lot, JP.block,
CPIT.description AS PlanIDdesc,
JP.plan_number, JI.part,
JI.reference_plan_number,
CCT.description AS CCT_description,
CCT.name AS CCT_name,
JI.order_date,
CMT.name AS MIDname,
JI.client_number, JI.pin,
CJT.name AS JobTypeName,
CPDT.name AS DivisionName,
JP.entity_id
FROM CMT RIGHT OUTER JOIN
CPDT RIGHT OUTER JOIN
JP ON
CPDT.entity_id = JP.division_id ON
CMT.entity_id = JP.m_id
LEFT OUTER JOIN
CPIT ON
JP.plan_id = CPIT.entity_id RIGHT OUTER
JOIN
JI LEFT OUTER JOIN
CCT ON
JI.county_id = CCT.entity_id LEFT OUTER JOIN
Companies ON
JI.client_entity_id = Companies.entity_id LEFT OUTER JOIN
CJT ON
JI.job_type_id = CJT.entity_id ON
JP.job_id = JI.entity_id
WHERE (JI.status = 1 AND (JP.status = 1 OR
JP.entity_id IS NULL))
ORDER BY file_number ASC

Could someone please tell me what I'm doing wrong.

Thanks

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Problem porting select code from SQL server to MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway