Skip to Content
0

What is the use of cast function in SAP BODS?

Nov 21, 2016 at 03:41 PM

806

avatar image

Hello,

I have seen many scenarios in which date variable is contain cast function. Can anyone please help what and where exactly cast function is used? I tried to print the variable value and its giving system date then why is cast function used.

I am naive to this community. Please also guide me how could I start a discussion on SAP BODS.

Thanks,

Rajan

script.png (69.8 kB)
job.png (97.4 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Matthew Ong Nov 21, 2016 at 09:16 PM
0

Hey Rajan,

Cast is to convert the datatype from one to another. Example Int to Varchar.

Best Regards,

Matthew Ong

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Ok Matthew.

Got it!!

Thanks :)

0
Arun Sasi Nov 22, 2016 at 08:22 AM
0

Refer Data Services Reference Guide for more details

Explicitly converts an expression of one data type to another.
Syntax
cast(expression,data_type)

Return Value
Returns the same value in data_type.

E.g. cast('20.3','decimal(3,1)')

print(cast(sysdate(),'varchar(10)'));

Regards

Arun Sasi


fsh73.png (619 B)
b1niw.png (498 B)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks for the verbose Arun! :)

Got it :)

0