I am trying to write some SAS codes in Teradata. There is one condition in my code :
So, the thing is when I am removing this condition from SAS and Teradata, the results are exact match to the decimal places, but after putting this condition I am getting differences between the result.
I have casted sum(x) and sum(y) to decimal(18,6)
You might check the avg_depth of the missing rows if it's close to zero:
< 0.0000005 will be rounded to 0
SAS might use FLOAT arithmetics, so you could try avg_depth=cast(sum(x) as float)/sum(y)
I have data like 123456*12 ..I need data before * as one column and after * as other column ..but when i run below statement its throwing me an error 2662..Please help.
cast(substring(ID from 1 for instr(ID,'*',1)-1) as int) as cust_num