How to convert variable value to Float instead of INT in the database update tools

Confluence User - 30 May, 2017

Hi,

How can i write my code to convert pobalanceamount to float instead of INT? The value might come in INT and Float. So to be prepared, its good to convert into Flaot.  Please refer below code.

 

update app_fd_tableA
set c_pobalanceamount = (CAST(c_pobalanceamount AS INT) - '#form.sdts_transaction.invoiceamount#')
where id = '#form.tableA.refflowid#'

tools

1


31 May, 2017
confluenceUser
confluenceUser

Hi, I believe this is an SQL question that depends on the database you are using. If it's MySQL you can try https://stackoverflow.com/questions/11830509/cast-to-decimal-in-mysql

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print