Validations
Posted: Fri Feb 10, 2006 12:50 pm
Hi ,
Iam using a FTP file stage to read the input file. Th File is having 70 columns, iam reading everything as varchar. I have to validate the amount and date columns. I have to reject the amount and date columns if they are varchar and i want to keep the null amounts and null dates.
In my file I have 40 columns as amount or date.
I tried the following
1.In my transformer i have 40 stage variable and iam using the function alpha and alnum. But iam getting lot of errors
2.I used function Num to check but here the null also getting rejected.
if num(mystring)=@true then mystring else "rej"
and in my constraint iam having stagevar1 ="rej" or stagevar2="rej".......for rejected file, and stagevar1<>"rej" and stagevar2<>"rej".
3. ISNULL and ISNOTNULL is not working.I guess for the null values in my input file i dont have any space the file looks like
My input file is abc,,,,123,ghgj,,,,,
Please suggest me an efficient way to do this validation.
Thanks
Sri
Iam using a FTP file stage to read the input file. Th File is having 70 columns, iam reading everything as varchar. I have to validate the amount and date columns. I have to reject the amount and date columns if they are varchar and i want to keep the null amounts and null dates.
In my file I have 40 columns as amount or date.
I tried the following
1.In my transformer i have 40 stage variable and iam using the function alpha and alnum. But iam getting lot of errors
2.I used function Num to check but here the null also getting rejected.
if num(mystring)=@true then mystring else "rej"
and in my constraint iam having stagevar1 ="rej" or stagevar2="rej".......for rejected file, and stagevar1<>"rej" and stagevar2<>"rej".
3. ISNULL and ISNOTNULL is not working.I guess for the null values in my input file i dont have any space the file looks like
My input file is abc,,,,123,ghgj,,,,,
Please suggest me an efficient way to do this validation.
Thanks
Sri