Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8378

Re: Errow with IF statement in Scripted Calculation view

$
0
0

Hello Anup,

 

how is to_int(2013-01-01) going to work?

It is not a number, it is not enclosed in single quotation marks, so it cannot be a string - what is SQLScript supposed to do with that?

 

The thing is: BUDAT is a date data type encoded as string.

Your comparison value looks like a date data type, also encoded as a string.

 

So why not simply use the proper data type conversion for it then?

CE_CALC('IF((date("BUDAT") >= date(20130101),"AMOUNT",'''')', DECIMAL(13,2)) AS "DTR"

 

 

- Lars


Viewing all articles
Browse latest Browse all 8378

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>