SQL query issue

  • There is an application built in java env and it has a SQL query in it. The back-end here is DB2. Below is a sample query, which is being executed thro appn, is returning some error which looks like "SQLERR -7, SQLSTATE 42601" . Is there anyway to fix this issue.

    SELECT inter.id, inter.type, name, xml, lockinfo, '', counter FROM inter WHERE inter.type='User' and name!='LAST MODIFIED' and name NOT LIKE '#DEL#%' and inter.id IN ( select id from middle where

    midname='EMAIL' and midval='CONFIGURATOR' ) order

    by name

    =============================================

    Note: We tried to run the same query individually from command centre and found it is giving the same kind of error. But if we edited the same query so that entire query written in one single line (no new lines), then it is working fine. As this application code cannot be edited. Any one can help to find out the way to fix this issue.

    Thanks in advance...

    ...Nag

  • quote:


    There is an application built in java env and it has a SQL query in it. The back-end here is DB2. Below is a sample query, which is being executed thro appn, is returning some error which looks like "SQLERR -7, SQLSTATE 42601" . Is there anyway to fix this issue.

    SELECT inter.id, inter.type, name, xml, lockinfo, '', counter FROM inter WHERE inter.type='User' and name!='LAST MODIFIED' and name NOT LIKE '#DEL#%' and inter.id IN ( select id from middle where

    midname='EMAIL' and midval='CONFIGURATOR' ) order

    by name


    as this is more DB/2 related you might want to post it to db2udbdba@lazydba.com.

    Visit the lazydba.com site, register, and you can post. But there is not heavy traffic on this list. So be prepared to wait some time.

    Frank

    http://www.insidesql.de

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply