|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Problem porting select code from SQL server to MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|