[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] RE: preserving "leading zeros" in a string



You can export them with a ' before the string.

let $numval = &some_numeric_looking_db_string_w_lead_zero

let $numval = '''' || $numval

do excel_write_string($numval)  !this being some function that prints to csv
                                          !but which i'm too lazy to write
out.

There's also a way to format a column/row/cell to be a TEXT column/row/cell.

So you could do it that way.  It's a bit more complicated, but I know
there's already some postings about it that you could search through.  Or,
open up a csv file, format the column/row/cell to TEXT, save as a different
name, and see what changed.  You can recreate that and print that line as a
formatter.



-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of
ruscs ___
Sent: Monday, February 14, 2005 3:25 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] RE: preserving "leading zeros" in a string


Hello,

I am exporting string values (which may contain numeric values) into a csv 
file. Some of these numeric values may contain leading zeros (for example, 
001111, 02222...)  When the import is complete, leading zeros are lost. 
(1111, 2222). How can these leading zeros be preserved?

Thanks for your help!



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users