Page 1 of 1

unknown argument error

Posted: Wed Dec 03, 2008 6:36 pm
by RAJEEV KATTA
I am writing a query similar to the below

select ename from emp where #eno# is null

#eno# is a job parameter when I pass the value as '' I am able to view the data from the oracle stage but when I run the job it gives me the error unknown argument IS and job gets aborted.

This is the only error msg I am getting in director.

How to trace whats the problem is as the same query is working well in oracle & even in datastage view data.

Posted: Wed Dec 03, 2008 8:22 pm
by chulett
What stage? And we would need to see the actual query to help, not something 'similar' to it. In that same vein, please post the actual unedited error from the job's log. You've no idea how many of the wild gooses we've chased because people felt the need to obfuscate their problem by giving incomplete or 'something like this' examples.

Lastly, please confirm the parameter value - a string you leave empty, literally two single quotes, etc. What other values, if any, do you ever pass? The name of another field, for example? I'm wondering because using "where '' is null" is the same as leaving off the where clause entirely or doing something like "where 1=1"... you get all of the records. :?

Posted: Wed Dec 03, 2008 9:57 pm
by ray.wurlod
WHERE '' IS NULL will never be true.

A zero-length string ("") is NOT the same as NULL. One has a known value, the other does not.

Posted: Thu Dec 04, 2008 1:02 am
by chulett
Actually, it *is* true... in Oracle. :wink:

Posted: Thu Dec 04, 2008 1:45 pm
by ray.wurlod
It is NEVER true. Oracle is wrong.

Posted: Thu Dec 04, 2008 1:50 pm
by chulett
Granted, but it equates to true in Oracle, regardless of however much that irks you. All Hail Larry the Great! :lol:

Posted: Thu Dec 04, 2008 2:01 pm
by ray.wurlod
Oracle bin Larry
:twisted:

Posted: Thu Dec 04, 2008 8:46 pm
by RAJEEV KATTA
Ray is correct.The stage being used is oracle enterprise stage.I found an work around for that & implemented.Thanks to all of you,appreciate very much your help.

Posted: Thu Dec 04, 2008 9:18 pm
by chulett
Could you please post your resolution to this problem? It will help future searchers if you close out this issue such that people can see both the problem and the solution.

Posted: Fri Dec 05, 2008 6:06 am
by sinhasaurabh014
whats the solution please?????

what was the work-around?

Posted: Wed Dec 10, 2008 4:50 pm
by RAJEEV KATTA
Used ANY filter and nvl to get that.Its more on the sql query side not the datastage.