Hi
I have written on stagevariable but it is giving me wrong result can any help me on this
mystagevariable if trans.empno=mast.empno then 1 else 0
both columns are varchar columns
trans.empno=00000802 (value coming from hash file)
mast.empno=802 (value coming from oracle stage)
but data stage shows both are same i am wondering how?
Thanks in advance
Error in Stagevariable
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
DataStage BASIC resolves the "equals" operator as That is, it performs a numeric comparison if both operands are numeric. You can force a string comparison using a Compare() function or by concatenating something non numeric (the same something, of course) to each operand.
Code: Select all
If Num(A) And Num(B) Then ((B-A) = 0) Else (A = B)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: