Re: Sybase isql converter
Posted in 1997
Mike McCaslin wrote:
>
> I have some Sybase SQL that I need to convert to run with DBaccess. Does
> anyone know of a conversion program?
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:
o ORDER BY on a column not selected
Add the missing column to the selected column list
o GROUP BY clauses that do not specify all aggregate columns
Add missing non-aggregates to the GROUP BY list and then post
process the output to summarize accross the values of the
previously omitted columns
o TOTAL or SUMs (I do not remember the syntax but this is the sub-total
capability of Sybase to return subtotals of over groups during GROUP BY
processing)
Post processing is the only solution (using awk/perl/"C"/...).
o Difference in specifying outer joins (I do not remember the Sybase
syntax but Informix/ANSI syntax is:
SELECT .... FROM table1, outer table2 WHERE ...This 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).
This is all that I can remember of the differences. Hope that this
helps.
Art S. Kagel