Hi,
You can try the following
cast( (total_cost (format 'Z(n times)9.9999')) as varchar(n+6)) ;
here
n - depends on the size defined
say for example if you have defined total_cost as decimal(18,2) then n = 18-1 = 17
in the above case the sql stmtn would be
cast( (total_cost (format 'Z(17)9.9999')) as varchar(23)) ;
please let me know if this works
↧