My database is SAP (mysql).
Your code genera the following sql:
SELECT t1.codigocliente AS t1_codigocliente, t1.nombre AS t1_nombre, t1.apellidos AS t1_apellidos, t1.nif AS t1_nif, t1.razonsocial AS t1_razonsocial, t1.fechaalta AS t1_fechaalta, t1.codigoformapago AS t1_codigoformapago, t1.codigoformaenvio AS t1_codigoformaenvio, t1.CreatedDate AS t1_CreatedDate, t1.ModifiedDate AS t1_ModifiedDate, t2.codigoformapago AS t2_codigoformapago, t2.nombre AS t2_nombre, t2.CreatedDate AS t2_CreatedDate, t2.ModifiedDate AS t2_ModifiedDate, t3.codigoformaenvio AS t3_codigoformaenvio, t3.nombre AS t3_nombre, t3.CreatedDate AS t3_CreatedDate, t3.ModifiedDate AS t3_ModifiedDate FROM ((cliente as t1 LEFT JOIN formapago as t2 ON t1.codigoformapago = t2.codigoformapago) LEFT JOIN formaenvio as t3 ON t1.codigoformaenvio = t3.codigoformaenvio) WHERE t1.codigocliente = 6
but my database don't support this way.
My database support the following way:
SELECT t1.codigocliente AS t1_codigocliente, t1.nombre AS t1_nombre, t1.apellidos AS t1_apellidos, t1.nif AS t1_nif, t1.razonsocial AS t1_razonsocial, t1.fechaalta AS t1_fechaalta, t1.codigoformapago AS t1_codigoformapago, t1.codigoformaenvio AS t1_codigoformaenvio, t1.CreatedDate AS t1_CreatedDate, t1.ModifiedDate AS t1_ModifiedDate, t2.codigoformapago AS t2_codigoformapago, t2.nombre AS t2_nombre, t2.CreatedDate AS t2_CreatedDate, t2.ModifiedDate AS t2_ModifiedDate, t3.codigoformaenvio AS t3_codigoformaenvio, t3.nombre AS t3_nombre, t3.CreatedDate AS t3_CreatedDate, t3.ModifiedDate AS t3_ModifiedDate FROM cliente t1 LEFT JOIN formapago t2 ON t1.codigoformapago = t2.codigoformapago LEFT JOIN formaenvio t3 ON t1.codigoformaenvio = t3.codigoformaenvio WHERE t1.codigocliente = 6
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is your database a standard MySQL database or is it the MaxDB database that SAP released?
If it's the MaxDB version, I haven't used it personally, but I'm VERY suprised it doesn't support bracketing in the join clause.
To get rid of the brackets will mean some changes in terms of the database providers and some code will be required.
Can you post a request (RFE) for this and include the specific version of the database server you are using so that I can make sure I cater for any other syntax issues that may be present.
- Richard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My database is SAP (mysql).
Your code genera the following sql:
SELECT t1.codigocliente AS t1_codigocliente, t1.nombre AS t1_nombre, t1.apellidos AS t1_apellidos, t1.nif AS t1_nif, t1.razonsocial AS t1_razonsocial, t1.fechaalta AS t1_fechaalta, t1.codigoformapago AS t1_codigoformapago, t1.codigoformaenvio AS t1_codigoformaenvio, t1.CreatedDate AS t1_CreatedDate, t1.ModifiedDate AS t1_ModifiedDate, t2.codigoformapago AS t2_codigoformapago, t2.nombre AS t2_nombre, t2.CreatedDate AS t2_CreatedDate, t2.ModifiedDate AS t2_ModifiedDate, t3.codigoformaenvio AS t3_codigoformaenvio, t3.nombre AS t3_nombre, t3.CreatedDate AS t3_CreatedDate, t3.ModifiedDate AS t3_ModifiedDate FROM ((cliente as t1 LEFT JOIN formapago as t2 ON t1.codigoformapago = t2.codigoformapago) LEFT JOIN formaenvio as t3 ON t1.codigoformaenvio = t3.codigoformaenvio) WHERE t1.codigocliente = 6
but my database don't support this way.
My database support the following way:
SELECT t1.codigocliente AS t1_codigocliente, t1.nombre AS t1_nombre, t1.apellidos AS t1_apellidos, t1.nif AS t1_nif, t1.razonsocial AS t1_razonsocial, t1.fechaalta AS t1_fechaalta, t1.codigoformapago AS t1_codigoformapago, t1.codigoformaenvio AS t1_codigoformaenvio, t1.CreatedDate AS t1_CreatedDate, t1.ModifiedDate AS t1_ModifiedDate, t2.codigoformapago AS t2_codigoformapago, t2.nombre AS t2_nombre, t2.CreatedDate AS t2_CreatedDate, t2.ModifiedDate AS t2_ModifiedDate, t3.codigoformaenvio AS t3_codigoformaenvio, t3.nombre AS t3_nombre, t3.CreatedDate AS t3_CreatedDate, t3.ModifiedDate AS t3_ModifiedDate FROM cliente t1 LEFT JOIN formapago t2 ON t1.codigoformapago = t2.codigoformapago LEFT JOIN formaenvio t3 ON t1.codigoformaenvio = t3.codigoformaenvio WHERE t1.codigocliente = 6
Sorry, I don't quite follow.
Is your database a standard MySQL database or is it the MaxDB database that SAP released?
If it's the MaxDB version, I haven't used it personally, but I'm VERY suprised it doesn't support bracketing in the join clause.
To get rid of the brackets will mean some changes in terms of the database providers and some code will be required.
Can you post a request (RFE) for this and include the specific version of the database server you are using so that I can make sure I cater for any other syntax issues that may be present.
- Richard