I, (or more to the point, SQLite) can't seem to retain leading zeros
on numbers.

The receiving field is defined as CHAR;
I'm using the SQLite Manager in Firefox.
I've also tried sqlite3 from the command line.
Here's a typical (and minimal) statement:
UPDATE UPCs SET UPC=043000205563;
UPDATE UPCs SET UPC=CAST(043000205562 AS CHAR) WHERE rowid=93; didn't
work either.

SELECT TYPEOF(UPC) FROM UPCs WHERE rowid=93; returns 'text'.

I'm reluctant to put quotes (single or double) around the values as
they are retained in the field.

On other text/numeric fields I've added a textual value; that seems to
"fix" the problem.  But not really.

Last question: is this an example of SQLite's "typelessness"?

Ted
-- 
__________________________________________________________________
3.14159265358979323846264338327950      Let the spirit of pi
2884197169399375105820974944592307   spread all over the world!
8164062862089986280348253421170679 http://pi314.at  PI VOBISCUM!
==================================================================
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to