Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett, rschirm, roy
-
pkomalla
- Premium Member
- Posts: 44
- Joined: Tue Mar 21, 2006 6:18 pm
Post
by pkomalla »
Hi all,
I am using ODBC stage to extract data from oracle for lookup. Here In user-generated query, I wrote a query ...
Select
column a.
column b,
new coulmn
where
(coulmn c=?)
union all
Select
column a.
column b,
new coulmn
where
(coulmn d=?);
Iam getting an error :
[datastage][SQLClient][ODBC][DataDirect][ODBClib] Invalid argument value
Can anyone help me
-
pkomalla
- Premium Member
- Posts: 44
- Joined: Tue Mar 21, 2006 6:18 pm
Post
by pkomalla »
Sorry guys ,....following is the correct query
Select
column a.
column b,
new coulmn
from
table A
where
(coulmn c=?)
union all
Select
column a.
column b,
new coulmn
from
table A
where
(coulmn d=?);
still i get the error
-
kris007
- Charter Member
- Posts: 1102
- Joined: Tue Jan 24, 2006 5:38 pm
- Location: Riverside, RI
Post
by kris007 »
Remove the ";" character at the end of the query. You should be good to go without it.
Kris
Where's the "Any" key?-Homer Simpson
-
pkomalla
- Premium Member
- Posts: 44
- Joined: Tue Mar 21, 2006 6:18 pm
Post
by pkomalla »
I found the problem........We cannot have two parameters(?) unless we have two key columns....
-
chulett
- Charter Member
- Posts: 43085
- Joined: Tue Nov 12, 2002 4:34 pm
- Location: Denver, CO
Post
by chulett »
... and you better select as many fields in your query as you have columns in the stage, and do so in the same order.
-craig
"You can never have too many knives" -- Logan Nine Fingers