cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to use SQL function CONVERT_CURRENCY in Cloud Application Programming Model

QuyVu
Participant
0 Likes
1,198

Hi all,

I'm trying to use Convert_currency function in my CAP application but I can't find a way to do it.
Please let me know how to use this function and others.

Regards

LeoVu

View Entire Topic
0 Likes

You should try this code to convert SQL function into currency

Create a table and populate it with two example currency amounts.
CREATE ROW TABLE sample_input (price DECIMAL(15,2),
                             source_unit NVARCHAR(4),
                             target_unit NVARCHAR(4),
                             ref_date NVARCHAR(10)
                             );

 INSERT INTO sample_input VALUES (1.0, 'SRC', 'TRG', '2011-01-01');
 INSERT INTO sample_input VALUES (1.0, 'SRC', 'TRG', '2011-02-01');

QuyVu
Participant
0 Likes

Thank you for your suggestions.