I have textual data that may look like integers (eg. "0325763213").
On insertion, any leading "0" will vanish. How do I prevent this 
and make the data be inserted verbatim?

Simple illustration:

    sqlite3 test 'create table t ( k text unique, v text);'
    perl -e 'use DBI; $db = DBI->connect( "dbi:SQLite:dbname=test" );
        $db->do( qq[REPLACE INTO t VALUES(?,?);], undef, "key", "0325763213");'
    sqlite3 test 'select * from t;'
    
returns:

    key|325763213


I am using the sqlite3_3.2.1-1 and libdbd-sqlite3-perl_1.08-1 packages
from Debian, in case it matters.


-jonathan

--
Jonathan H N Chin, 2 dan | deputy computer | Newton Institute, Cambridge, UK
<[EMAIL PROTECTED]> | systems mangler | tel/fax: +44 1223 767091/330508

                "respondeo etsi mutabor" --Rosenstock-Huessy

Reply via email to