RE: Make MySQL syntax work in Informix
Posted in 2007
Thanks, Zev and Mark for the SEQUENCE suggestions.
I will give that a try and see what happens.
--Sky
-----Original Message-----
From: Zev Berezin [mailto:zevb@bhphoto.com]
Sent: Thursday, July 05, 2007 8:30 AM
To: Southwell Schuyler
Subject: RE: Make MySQL syntax work in Informix
hibernate_sequence is a sequence as semantically named. Nextval is a
built in function that will return that next value.
Sequences were first introduced in Informix 9.4.
See here on how to use them.
http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/co
m.ibm.sqls.doc/sqls264.htm
Run this to create table dual as in oracle
create table dual
(dummy char(1));
HTH,
Zev Berezin
-----Original Message-----
From: informix-list-bounces@iiug.org
[mailto:informix-list-bounces@iiug.org] On Behalf Of Southwell Schuyler
Sent: Thursday, July 05, 2007 10:59 AM
To: informix-list@iiug.org
Subject: Make MySQL syntax work in Informix
I have a semi-canned package (JasperSoft JasperReports / JasperServer)
that I am attempting to make use Informix as it's report repository, in
lieu of installing an Oracle / MySQL instance.
I have the schema (successfully ?) converted (I won't know for certain
until I can get the JasperServer product (installed in Tomcat) to come
up.
It is failing on the following MySQL/Oracle syntax:
-----
SELECT hibernate_sequence.nextval FROM dual;
14:45:20,272 WARN JDBCExceptionReporter,main:77 - SQL Error: -217,
SQLState: IX000
14:45:20,300 ERROR JDBCExceptionReporter,main:78 - Column (nextval) not
found in any table in the query (or SLV is undefined).
-----
I have implemented several variants of the 'dual' table (everything from
Jonathan Leffler's 'dual' view to an actual table), and have also
created the hibernate_sequence table. Both tables have a 'nextval'
column.
If I do this without the nextval column in the table, then I get an
error that states column hibernate_sequence not in any table...
---
Is there ANY way to write a VIEW / SYNONYM / SELECT TRIGGER (this is
relatively low volume) to FAKE this query into executing? I really
would like to avoid implementing the Oracle / MySQL instance if at all
possible.
Thanks,
Schuyler L. Southwell
Software Engineer, Consulting
Maricopa County Attorney's Office
tel: 602 506 8107
southwel@mcao.maricopa.gov
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list