Hi i am trying to run this CASE STATEMENT in INDB forumula tool but its not working
Case
WHEN LEFT("CustomerKey",2) == '0.'
then REPLACE("CustomerKey",'.0','')
else "CustomerKey"
END
Error: Formula In-DB (37): Error: Microsoft SQL Server Native Client 11.0: Incorrect syntax near '='.\42000 =
Note: CustomerKey is ineger32 type
Solved! Go to Solution.
Hi @tjamal1 ,
try:
Case
WHEN LEFT("CustomerKey",2) = '0.'
then REPLACE("CustomerKey",'.0','')
else "CustomerKey"
END
I think, SQL Server handles both LEFT and REPLACE by internal type conversion, so the only unknown part is "==",
has to be replaced by "=".
Letr me know, if this solves the problem.
Best,
Roland