On Wed, May 19, 2010 at 03:36:03PM -0400, Ted Rolle, Jr. scratched on the wall: > I'm entering UPCs. > > 0071318119 becomes 71318119. This is not good, or expected, for that > matter
Are you entering 0071318119 (a number) or are you entering '0071318119' (a string)? The number is already a number, and the zeros will be dropped. The string is a string and should be left alone: $ ./sqlite3 SQLite version 3.6.23.1 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table t ( i text ); sqlite> insert into t values ( '000123' ); sqlite> insert into t values ( 000123 ); sqlite> select * from t; 000123 123 -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users