SQL Server Migration. Error -25, input (;) encountered after end of query

1,120 views
Skip to first unread message

Xavi Hidalgo

unread,
Sep 19, 2014, 2:28:42 PM9/19/14
to intersystems...@googlegroups.com
ERROR #5540: SQLCODE: -25 Message: Input (;) encountered after end of query^ SELECT * FROM TANTIGUEDADDAT WHERE COEMPRESA = ? AND COANTIGUEDAD = ? AND ( DADESDE < ? OR DADESDE = ? ) ORDER BY DADESDE ASC ;

HI all. First of all, sorry for my bad English.

I am doing a migration from an SQL Application. I can't change de code, it must run also in SQL Server..

When execute a statement ending with a semicolon, app crash with an ODBC Error -25...

If i run that statement manually from Ensemble Portal (version 2010) i have the same result. In fact, this is the result with the most simplest query, always an error.

I have read that Intersystems SQL admit that character (semicolon) at the end of an SQL Statement, but for some reason it don't work ...

Some ideas ???

Thanks in advance !!!

Brendan Bannon

unread,
Sep 25, 2014, 3:45:48 PM9/25/14
to intersystems...@googlegroups.com

I think you just need to remove the “;” at the end of the query.

 

For errors like this we generally display the SQL up to the point we got confused, so in this case you have the full query with “;” at the end so “;” is the problem.

 

Brendan

--
--
Caché, Ensemble, DeepSee

---
You received this message because you are subscribed to the Google Groups "Caché, Ensemble, DeepSee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-publi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xavi Hidalgo

unread,
Sep 28, 2014, 7:21:50 AM9/28/14
to intersystems...@googlegroups.com, brendan...@intersystems.com
Hi Brendan, the intention was not changing the code... Intersystems documentation said that Caché should ignore that semicolon (this is what i understood), and they're required by the ANSI SQL Standard.

The programmer want's to have the same code for SQL Server, Oracle and Intersystems (I don't know if this will be possible).

Thank you !!!

El dijous 25 de setembre de 2014 21:45:48 UTC+2, Brendan Bannon va escriure:

To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-public-cache+unsub...@googlegroups.com.

Brendan Bannon

unread,
Sep 29, 2014, 8:04:30 AM9/29/14
to Xavi Hidalgo, intersystems...@googlegroups.com

Hello

 

Clearly I did not read the full post the first time around.  Sorry about that.

 

The only place I see Cache supporting a delimiter at the end of an SQL statement is when you have a file of DDL and or DML statements and you load those files with something like:

 

Do $SYSTEM.SQL.ImportDir("Sybase","C:\Work\db1\,"C:\Work\db1\import.log",";")</li>

 

 

Cache does not support multiple SQL statements in one Execute, so via ODBC or the Portal or,…. We do not support a “;”.

 

 

Brendan

To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-publi...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages