cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC adapter

Former Member
0 Kudos

I am writing data in oracle database through jdbc adapter there are some fields for which null is allowed. But when i am sending those fields with no value i am getting error " java.sql.SQLException: ORA-00936: missing expression".

I have selected NUll VALUE in jdbc adapter.

Although i have tried withboth Empty String and Null value but it's not working. When i am hardcoding "null" for any such field than only its inserting value in database.

regards,

indu

Edited by: Indu Khurana on Jul 8, 2008 9:56 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI,

Map your target field with constant

constant----


>target field. In the constant function delete the BLANK. and map it with target field. Use NUll VALUE in jdbc adapter. also check your datatype structure for INSERT.

Also refer this blog

Regards,

Pradeep

Former Member
0 Kudos

Hi,

Check this complete JDBC adapter configuration guide:

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm

Thanks,

Boopathi

Former Member
0 Kudos

Hi Indu,

Please go ahead and use NULL VALUE option only.

Also check advance mode > additional parameters, include logsqlstatement = true.

Run the interface once more. Check the communication channel now. It will show the actual insert statement which is trying to insert into the DB.

This will give you better clarity as to why the erro missing expression is coming. This also due to some syntax error in the insert statement.

-Regards,

Shamly

Former Member
0 Kudos

Hi

Thanks for your response.

I have tried with logsqlstatement= true but still i am not able to see the actual insert statement. And i don't think that the problem is with insert statement as when all values are coming or i am hardcoding NULL it's working fine.

Former Member
0 Kudos

Hi Indu,

For those fields which you are having this problem use trim function in message mapping. This had worked for me once. This removes any urecognisable white spaces. Give it a try.

InputField ->trim-->TargetField.

Also,

Make sure you give the logSQL statement in the Receiver communication channel.

To view the SQL log Click on the message ID of the communication channel monitoring.

or, alternatively, in Runtime workbench, click your message> details> audit log tab.

-Hope it solves for you too.

Shamly.

Edited by: Shamly MM on Jul 8, 2008 11:32 AM

Former Member
0 Kudos

I have done it in receiver JDBC adapter only and checked in RWB but in audit log i couldn't see the insert statement.

Former Member
0 Kudos

hi indu....

when u try to insert any special characters in numeric fields then 'missing expression' error will come.Just check ur data once.

Try to use trim function to map the fields which u r facing problem.

Sreedhar Goud.

Former Member
0 Kudos

Hi Indu,

logSQLStatement : check the case. SQLS is in capital.

You have to to type logSQLStatement in the name column and true in the value column.

Missing expression is caused due to some non numeric values in numeric field. Are your concerned fields numeric in the DB table?

Please update the thread if the issue is already resolved.

-Regards

Shamly

Former Member
0 Kudos

Hi Indu,

Please check the link related to Receiver JDBC Adapter.

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm

Hope that will help you

Thanks

Sudharshan