on 07-10-2007 5:33 AM
Hi all,
I have a problem in Handling null values using stored procedeure.
The Source is a proxy and the reciving is a stored Procedure.
The value when any field is not populated from the proxy then the value would by 0000-00-00(its a date field).Instead for 0000-00-00 we need to populate the stored procedure with value which will be a NULL in the DataBase.
I tried using Blank values but it throws an exception.
Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'NDMS.NDMS_SAP_INTERFACE_PKG.NDMS_SAP_PROCESS' (structure 'StatementName'): java.lang.IllegalArgumentException
Aditya,
Did u tried my logic in ur previous thread.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thnks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Could any one say me why i am getting the error of illegal argument.
Rgds
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can always solve it by writing the SQL yourself using SQL_DML and then checking for the value of your parameters. If your parameter has no value XI will return value beginning with char '$'. You can for example use the following approach:
(SELECT CASE LEFT('$someParam$',1)
WHEN '$' THEN NULL
ELSE '$VisitID$'
END)
Best regards,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
The if the date is not populated then we the date fields get populated automatically to 0000-00-00. Now when the data is in XI we have to map it in such a way to the target so that the data is represented as NULL in the data base.
Not constant NULL bt the data base value NULL.
Is there no way we can pass this blank value or do we need to do changes only in the stored procedure.
Rgds
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
The problem is only when there are no values populated,
When the date fields are populated properly then i need to map the dates also
Thnks
Rgds
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aditya,
Use a ifWithOutElse to check if the source is equal to 0000-00-00 and then use a not and provide it as input to condition block. In the then part map Date from source. Map the result to JDBC date tag.
Date(proxy)
equals -- not ---- ifWithOutElse ---Date (JDBC)
/
Constant(0000-00-00)
Could not show you the mapping of then block here.
Regards
Jai Shankar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.