hi all,
I have a weird problem, which i'm unable to understand.
I created a SQL query using 'INNER JOIN' and my query is
SELECT
datackt1.`D_CKT`, datackt1.`D_SIGNAL`, datackt1.`D_BLDG1`,
dwo1.`DWO_TYPE`, dwo1.`DWO_CURREN`
FROM
{ oj `datackt` datackt1 INNER JOIN `dwo` dwo1 ON
datackt1.`D_STANUM` = dwo1.`DWO_CKT`}
WHERE
dwo1.`DWO_CURREN` = 'Y' AND
(datackt1.`D_SIGNAL` = '10BaseT' OR
datackt1.`D_SIGNAL` = '100BaseTX') AND
(dwo1.`DWO_TYPE` <> '*CANCEL*' AND
dwo1.`DWO_TYPE` <> 'Cancelled DWO' AND
dwo1.`DWO_TYPE` <> 'Deactivate' AND
dwo1.`DWO_TYPE` <> 'Information Only')
where datackt and dwo are my database tables.
when i try to run this query i get a message :
ODBC error: [MySQL][ODBC 3.51 Driver][mysqld-4.0.16-nt] you have an error in your SQL syntax .check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN 'dwo' dwo1 ON datackt1, 'D_STRANUM'=dwo1.'DWO_CKT'}
i verified that the fields D_STRANUM and DWO_CKT are of the same type.
i'm using crystal reports to generate queries.
I'm new to SQL. can anyone help me.