Page 1 of 1

stagevariable

Posted: Thu Nov 06, 2008 6:03 am
by basu.ds
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

Posted: Thu Nov 06, 2008 9:12 am
by srinagesh
Try something like

Code: Select all


if "*" : trans.empno = "*" : mast.empno then 1 else 0 


Posted: Thu Nov 06, 2008 12:10 pm
by ray.wurlod
As I already answered in one of your other posts, use the Compare() function if you need to force a string comparison. Syntax of the Compare() function can be had from the DataStage BASIC manual or from the on-line help.

Code: Select all

Compare(mast.empno, trans.empno, "L")