Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Mr. Tezozomoc
Please verify that they have implemented a 'natural sort' vs. a 'lexical sort' Tezo. Original Message Follows From: Darren Duncan <[EMAIL PROTECTED]> Reply-To: sqlite-users@sqlite.org To: sqlite-users@sqlite.org Subject: Re: [sqlite] preventing text to integer conversion of bind

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Darren Duncan
At 12:55 AM + 6/16/05, Mr. Tezozomoc wrote: sqlite is typeless I have addressed this issue in the following HOWTO: http://www.mail-archive.com/sqlite-users@sqlite.org/msg03205.html Please refer to it. Tezozomoc. I think not. From your own HOWTO: Assumption... this is based on

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Mr. Tezozomoc
sqlite is typeless I have addressed this issue in the following HOWTO: http://www.mail-archive.com/sqlite-users@sqlite.org/msg03205.html Please refer to it. Tezozomoc. Original Message Follows From: Darren Duncan <[EMAIL PROTECTED]> Reply-To: sqlite-users@sqlite.org To:

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Darren Duncan
At 11:39 AM -0400 6/15/05, Matt Sergeant wrote: I added it because of another bug report that was incorrectly sorting integer columns based on text sort order. For example if you inserted: ("k1", 8); ("k2", 9); ("k3", 10); ("k4", 11); and then asked for: SELECT * FROM t ORDER BY Column2

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Matt Sergeant
On 15 Jun 2005, at 17:02, Jonathan H N Chin wrote: So perhaps the check no longer performs a useful function now that sqlite allows one to specify the data type of the column? Perhaps indeed. I think I'll remove it from the next release. Matt.

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Jonathan H N Chin
Matt Sergeant wrote: >I added it because of another bug report that was incorrectly sorting >integer columns based on text sort order. [...] >To be honest I'm not entirely sure what the correct fix is - maybe >ignore the above bug and tell the requestor he has to: SELECT * FROM t >ORDER BY

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Matt Sergeant
On 15 Jun 2005, at 11:56, Jonathan H N Chin wrote: I would be interested to know what version of DBD::SQLite Puneet Kishor is using, since I believe I have tracked the issue to a test in the sqlite_st_execute() function in dbdimp.c : else if (looks_like_number(value)) { /* bind

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Puneet Kishor
On Jun 15, 2005, at 11:56 AM, Jonathan H N Chin wrote: Thanks for the suggestions. DRH's workaround, while it would work, seems very ugly. I would be interested to know what version of DBD::SQLite Puneet Kishor is using, since I believe I have tracked the issue to a test in the

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-15 Thread Jonathan H N Chin
Thanks for the suggestions. DRH's workaround, while it would work, seems very ugly. I would be interested to know what version of DBD::SQLite Puneet Kishor is using, since I believe I have tracked the issue to a test in the sqlite_st_execute() function in dbdimp.c : else if

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-14 Thread Darren Duncan
At 3:34 PM -0400 6/14/05, D. Richard Hipp wrote: On Tue, 2005-06-14 at 20:18 +, [EMAIL PROTECTED] wrote: 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

Re: [sqlite] preventing text to integer conversion of bind variables in perl

2005-06-14 Thread Puneet Kishor
[EMAIL PROTECTED] wrote: 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

[sqlite] preventing text to integer conversion of bind variables in perl

2005-06-14 Thread jc254sql
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(