|
|
Question : Building Informix SQL Statements
|
|
I have a little problem transfering the SQL Statements which ran under MySQL to the Informix SQL
I already asked a question in
http://www.experts-exchange.com/Databases/Mysql/Q_20662870.html
this worked fine for MySQL however as we do a Benchmark for Databases the Statements are not compatible
In fact when I do the following
SELECT LENGTH(column) AS len, COUNT(*) AS nbr FROM table WHERE LENGTH(column) BETWEEN lower AND upper GROUP BY len ORDER BY len
the len is not accessible in the Where block or in the Group by , Order by
it says it can't fin the "len"Column
How should I change this to be accessible.
Second Problem:
This statement does not execute, it says Syntax Error:
SELECT Count DISTINCT LENGTH(column) FROM table
However for numeric values this works fine with
Select Count Distinct(column) from table
But for Strings i want to do it over the length of the string not over the contents.
|
Answer : Building Informix SQL Statements
|
|
yes, distinct on columns is also an extension of MySql
little question : WHY are you porting to such a pityful restricted-limited system as Informix ?
|
|
|
|
|