Re: [sqlite] prevent sqlite from interpreting string as numbers?

2010-05-17 Thread peter360

Ah... that is what I missed. Thanks!

On the other hand, why doesn't sqlite give me an error or warning when I
used "string", if it has no meaning?



Igor Tandetnik wrote:
> 
> peter360 wrote:
>> I see this in sqlite
>> 
>> sqlite> create table t1(c1 string);
> 
> You want t1(c1 text). "string" has no special meaning to SQLite, while
> "text" does.
> 
> Igor Tandetnik
> 
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/prevent-sqlite-from-interpreting-string-as-numbers--tp28565639p28587341.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] prevent sqlite from interpreting string as numbers?

2010-05-14 Thread peter360

I see this in sqlite

sqlite> create table t1(c1 string);
sqlite> insert into t1(c1) values('100.200');
sqlite> select * from t1;
100.2

but I don't want sqlite to treat 100.200 as a number.  I want to treat it as
a string (it is the first two octets of an ip address).  How do I achieve
that?
-- 
View this message in context: 
http://old.nabble.com/prevent-sqlite-from-interpreting-string-as-numbers--tp28565639p28565639.html
Sent from the SQLite mailing list archive at Nabble.com.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users