HomeActive Query BuilderQuestion About Generated SQL

Question About Generated SQL


The AQB tool generates an SQL string that contains inner joins in the from clause; but I was wondering if there was a way to have it generate SQL using the older/less preferred was with the joins specified in the where clause.

For example...instead of

SELECT A.*, B.* FROM A INNER JOIN B ON A.ID = B.ID WHERE A.ID > 10

I'd like to get something like

SELECT A.*, B.* FROM A, B WHERE A.ID = B.ID AND A.ID > 10

Rob | email
July 31 2008, 10:33 AM
Dear Rob,

There is no option to do that.
If your server has no support of such syntax, you may use the ANSI SQL/89 syntax provider.

Sincerely
Sergey Smagin
Sergey Smagin | email
19 hours, 58 mins since original post
Thank you Sergey - that was perfect.

One more related question, if you don't mind; is there a way to tell the Syntax Provider (or Query Builder?) to include the Schema name in the query?

Like

SELECT MYSCHEMA.A.*, MYSCHEMA.B.* FROM MYSCHEMA.A, MYSCHEMA.B...etc...
Rob | email
1 day, 2 hours since original post
You may set the ObjectPrefixSkipping to opsSkipDatabase value. This is the property of the QueryBuilder component (and possibly of the SQLBuilder component as well, sorry I can't check it right now)
Sergey Smagin | email
1 day, 6 hours since original post
This topic is closed