ORA-00933 SQL command not properly ended ...

I am trying to write a VB app to access our Oracle data. I have been able to do this up until I tried to use the "DECODE" function. Code as follows:

strSql = "SELECT 'CREATED' AS Action_Code, " & _
"sp.PART_NO AS Part_Number, " & _
"sp.CATALOG_DESC AS Part_Description, " & _
"DECODE(sp.catalog_type,'Inventory part','PUBLIC','PRIVATE') Catalog_View, " & _
"'~' AS Terminator " & _
"FROM ifsapp_inventory_Part AS ip " & _
"LEFT OUTER JOIN ifsapp_Sales_Part AS sp ON sp.contract=ip.contract) AND sp.part_no=ip.part_no " & _
"ORDER BY ip.Part_No"

AddStatus("Opening Oracle Connection ...")
objConn = New OracleConnection(strConn)
objConn.Open()

AddStatus("Excecuting SQL ...")
dataAdapter = New OracleDataAdapter(strSql, objConn)
dataAdapter.Fill(dataSet)

Fails with ORA-00933. Any ideas?

Thanks,
Bret

Comments

  • ok - figured it out. Stupid typo - the is an extraneous ')' in the code.
Sign In or Register to comment.

Howdy, Stranger!

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

Categories

In this Discussion