I have made the leap to MySQL and am currently trying to move a vb 6 app from Access to MySQL. I used the MySQL Migration Toolkit to move the Access db to MySQL.
I am struggling with some of my queries in the application I made in VB 6 though.
The following query worked perfectly in MS Access:
In MySQL the alias for fields produces nothing and having the two conditions in the where clause prevents any rows from returning.
If I take out the aliases by pulling in the fields directly (i.e. no "Patients.pLName & ', ' & Patients.pFName AS Patient_Name" just "Patients.pFName, Patients.pLName") I get the pertinent fields returned.
If I use either of the where conditions seperately I get rows retruned.
Is the syntax that different? I'm googling for answers but haven't found a thing yet. If you can spot an obvious error and/or have some good links on this topic I'd sure appreciate either.
Thanks In Advance
I am struggling with some of my queries in the application I made in VB 6 though.
The following query worked perfectly in MS Access:
Code:
SELECT InjectSchedule.isChartNo AS Chart_Number, InjectSchedule.isStartDate, Patients.pLName & ', ' & Patients.pFName AS Patient_Name,
Doctors.mdLName & ', ' & Doctors.mdFName AS Doctor_Name, Insurance.iInsCompany AS Insurance, HHCA.hName AS HHCA
FROM Patients INNER JOIN (Insurance INNER JOIN (HHCA INNER JOIN (Doctors INNER JOIN InjectSchedule ON Doctors.mdID =InjectSchedule.isDoctor) ON HHCA.hID = InjectSchedule.isHHCA) ON Insurance.iID= InjectSchedule.isIns) ON Patients.pID = InjectSchedule.isPatID
WHERE InjectSchedule.isInactive = False
AND InjectSchedule.isTherComp = False
ORDER BY Patients.pLName"
In MySQL the alias for fields produces nothing and having the two conditions in the where clause prevents any rows from returning.
If I take out the aliases by pulling in the fields directly (i.e. no "Patients.pLName & ', ' & Patients.pFName AS Patient_Name" just "Patients.pFName, Patients.pLName") I get the pertinent fields returned.
If I use either of the where conditions seperately I get rows retruned.
Is the syntax that different? I'm googling for answers but haven't found a thing yet. If you can spot an obvious error and/or have some good links on this topic I'd sure appreciate either.
Thanks In Advance