Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

SQL Command not properly ended

hushpuppehushpuppe Member Posts: 2
I am getting an error:"java.sql.SQLException: ORA-00933: SQL command not properly ended". This is as a result of running the SQL code below in my Java program.The code runs excellent on my Oracle database and I get the correct result. Just when I run it from my Java program. I get that error. I have checked all of my exceptions if they are caught and thrown. I have run out of ideas to solve this,please help!!!!

SELECT distinct nvl(BD.value,0) as Value
FROM bullet_R B,
bullet_data_R BD,
bullet_data_R BD2,
bullet_data_desc_R BDD
Where B.store_tm > (sysdate - 1 / 24)
AND B.bullet_id = BD.bullet_id
AND B.bullet_id = BD2.bullet_id
AND BD.data_Id = BDD.data_Id
AND BD2.DATA_ID = 40
AND upper(BD2.VALUE) like upper('North')
AND data_desc like 'BulletGap';




Comments

  • infidelinfidel Member Posts: 2,900
    : I am getting an error:"java.sql.SQLException: ORA-00933: SQL command not properly ended". This is as a result of running the SQL code below in my Java program.The code runs excellent on my Oracle database and I get the correct result. Just when I run it from my Java program. I get that error. I have checked all of my exceptions if they are caught and thrown. I have run out of ideas to solve this,please help!!!!
    :
    : SELECT distinct nvl(BD.value,0) as Value
    : FROM bullet_R B,
    : bullet_data_R BD,
    : bullet_data_R BD2,
    : bullet_data_desc_R BDD
    : Where B.store_tm > (sysdate - 1 / 24)
    : AND B.bullet_id = BD.bullet_id
    : AND B.bullet_id = BD2.bullet_id
    : AND BD.data_Id = BDD.data_Id
    : AND BD2.DATA_ID = 40
    : AND upper(BD2.VALUE) like upper('North')
    : AND data_desc like 'BulletGap';

    Try removing the semicolon when passing it through java


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • Singer12Singer12 Member Posts: 18
    Hi,

    Will it be possible for you to send the Java Code where you are using the mentioned SQL

    Singer12



  • MacNeilMacNeil Member Posts: 19
    Hi,
    Could you try by Getting rid Of the Semicolon.... If dosent work can u attach the JAVA Code...
    Bye...

Sign In or Register to comment.