Hi,
I have a flat file with EmpNo and DeptNo. I am doing a lookup on teradata API based on EmpNo and try to get salary. The API has the following sql
Select EmpNo
Salary
from Employee
where EmpNo = :EmpNo
The lookup however fails with a message Cannot use value (or macro parameter) to match EmpNo
What could be the problem ?
Cant we do Teradata lookup as we OCI Lookups?
Thanks much in advance.
Sam
TeraData API Lookup based on a flat file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 20
- Joined: Thu Oct 06, 2005 12:23 pm
-
- Charter Member
- Posts: 560
- Joined: Wed Jul 13, 2005 5:36 am
- Location: Ohio
-
- Participant
- Posts: 20
- Joined: Thu Oct 06, 2005 12:23 pm
Hi
Its a user defined sql.
To explain once again..
The flat file suppose gets an employee no 20. I then lookup to teradata running the following query, and try to get the Salary back.
Select EmpNo ,
Salary
from Employee
where EmpNo = :EmpNo
I also tried substituting :1 but it didnt work.
Sam
To explain once again..
The flat file suppose gets an employee no 20. I then lookup to teradata running the following query, and try to get the Salary back.
Select EmpNo ,
Salary
from Employee
where EmpNo = :EmpNo
I also tried substituting :1 but it didnt work.
Sam
problem??
If you pass the value to a teradata api filling in on stage tab teradata director(server) UserId and password for logging in to teradata. give it the table name and user defined sql to select the record using (passed field(field type) and a select from where field = :(using field name) it should be ok
-
- Participant
- Posts: 20
- Joined: Thu Oct 06, 2005 12:23 pm
Have you used User Defined SQL to do lookups with the Teradata stage before this? If not or you're not completely sure what the sql should look like - let the stage generate it for you first. Get it close and see what the generated sql looks like. Switch it User Defined and tweak from there. Then there won't be any questions around what it needs to look like or the nuances of the bindings.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers