Re: Sybase isql converter
Posted in 1997
Art S. Kagel wrote:
>
>I don't know of such a beast. The SQL should be mostly compatible.
>The things to watch out for are Sybase non-ANSI SQL constructs like:
> [snip]
>o Difference in specifying outer joins (I do not remember the Sybase
> syntax but Informix/ANSI syntax is:
> SELECT .... FROM table1, outer table2 WHERE ...>his is a right outer join (ie data or a NULL row are selected from
>the table on the right (table2) for each row in the table on the left
>(table1). Informix does not support left outer joins (you can always
>reverse the order of naming the tables).
In Sybase:
SELECT ...
FROM table1, table2, table3, table4
WHERE <inner joins between table1 and table2>
AND table3.id =* table1.id
AND table3.col >= 2
AND table4.id =* table2.id
AND table4.col >= 3
In Informix:
SELECT ...
FROM table1, table2, OUTER table3, OUTER table4
WHERE <inner joins between table1 and table2>
AND table3.id = table1.id
AND table3.col >= 2
AND table4.id = table2.id
AND table4.col >= 3
But the Informix syntax is more powerful, as it allows further inner-joins
and outer-joins on each of the outer tables (table3 and table4 above):
SELECT ...
FROM table1, table2,
OUTER (table3, table3b),
OUTER (table4, table4b, OUTER table4c)without requiring a separate temporary table to hold the inner joins of
table3 and table3b above.