I have question regaing the use of the SQL Char() function in IceBreak.
When I use SQL_Execute_CallBack() with an SQL string that uses Char() to convert a number to a string I get a comma instead of a decimal point.
The SQL looks something like this:
'Select apPcnt,Concat(Concat(apVatd,' - '),apPcnt) As Desc,apVatd From Nom016P Order By apVatd ASC '
Field apPcnt contains the VAT percentage rate and is defined as a 5P2 field.
Field apVatd is the VAT description.
The Concat() should result in something like 'STANDARD - 15.00', however I get a comma instead of a decimal point in IceBreak.
The result of the Char() function is '15,00' instead of '15.00'.
If I run the same SQL query on the green screen in 'STRSQL' I get the correct result.
The CCSID of the system is 285.
How can I get SQL_Execute_CallBack() to return the correct result?
Regards
Syd.
Re: SQL string editing
Hi Syd;
The decimal point in IceBreak SQL is determined by the job value. So if you want the period instead of comma, you can just change the job at runtime with:
Regards
Niels
Re: SQL string editing
Thanks Niels,
Unfortunately it does not work.
The Char() function in SQL still uses a comma instead of a period.
It is not a problem on the green screen - only when using the Icebreak SQL_Execute_CallBack() function
The SQL
Select apPcnt,Concat(Concat(Concat(apVatd, ' - '),Char(apPcnt)),'%' ) As Desc,apVatd From Nom016P Order By apVatd ASC
returns something like:
apPcnt = '15.00'
desc = 'STANDARD - 15,00%'
apVatd = 'STANDARD'
Note - the period is correct when the apPcnt is returned as a number. but not correct when the apPcnt is converted to character.
Regards
Syd