Hi,
We have to write records of table to csv format. We were using following format
links: flip str
intt`flt ! ((“vReporter”; “vData”; “CDR”); (1000; 2031; 4098); (0.00001; 0.000001; 0.0000001))
csv 0: links
It will give following result:
str,intt,flt
vReporter,1000,1e-005
vData,2031,1e-006
CDR,4098,1e-007
We do not want exponential format like above. we want the result in decimal format with n number of decimals.
We end up writing following function to apply formatting for float columns:
RemoveScientificNotation:{[tblName]
mt:0!meta 1#tblName
;colss:{[col] $[(col t)="f";".Q.f[16;] each ";""], string col
c} each mt
;selectQry:“select “, (”,” sv colss), " from tblName"
;ff:parse selectQry
;?[tblName;raze ff 2;0b;ff 4]}
Is there any other way?