[sqlite] How to search column ascii containing chr(0)

2011-06-05 Thread iip
Hi All, As subject, I want to know how search column that contain ascii chr(0), I already use google to search but no luck, I'm using python language. Thanks in advance, -iip- ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Plan not optimized ?

2011-06-05 Thread Stéphane MANKOWSKI
Hi, Thank you for the answer. Do you know if it's planned ? Do you know a workaround? Regards, Stephane Le samedi 4 juin 2011 12:36:47, Richard Hipp a écrit : > 2011/6/3 Stéphane MANKOWSKI > > > 4-EXPLAIN QUERY PLAN SELECT total, total+1, total+2 FROM v_c > > > >

Re: [sqlite] How to search column ascii containing chr(0)

2011-06-05 Thread Igor Tandetnik
iip wrote: > As subject, I want to know how search column that contain ascii chr(0) select * from MyTable where hex(MyField) like '%00%'; -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] How to search column ascii containing chr(0)

2011-06-05 Thread Robert Myers
On 6/5/2011 8:47 AM, Igor Tandetnik wrote: > iip wrote: >> As subject, I want to know how search column that contain ascii chr(0) > select * from MyTable where hex(MyField) like '%00%'; That query doesn't work. If the field contains 0\n, that would match (300A)

Re: [sqlite] How to search column ascii containing chr(0)

2011-06-05 Thread iip
On Sun, Jun 5, 2011 at 8:47 PM, Igor Tandetnik wrote: > iip wrote: > > As subject, I want to know how search column that contain ascii chr(0) > > select * from MyTable where hex(MyField) like '%00%'; > > -- > Igor Tandetnik > yes, I already did

Re: [sqlite] How to search column ascii containing chr(0)

2011-06-05 Thread Igor Tandetnik
Robert Myers wrote: > On 6/5/2011 8:47 AM, Igor Tandetnik wrote: >> iip wrote: >>> As subject, I want to know how search column that contain ascii chr(0) >> select * from MyTable where hex(MyField) like '%00%'; > > That query doesn't work. If the

Re: [sqlite] [mlist] How to search column ascii containing chr(0)

2011-06-05 Thread reseok
iip schrieb: > Hi All, > > As subject, I want to know how search column that contain ascii chr(0), I > already use google to search but no luck, > > I'm using python language. > > Thanks in advance, > > -iip- > ___ > sqlite-users mailing list >

Re: [sqlite] [mlist] How to search column ascii containing chr(0)

2011-06-05 Thread Igor Tandetnik
res...@googlemail.com wrote: > iip schrieb: >> As subject, I want to know how search column that contain ascii chr(0), I >> already use google to search but no luck, > > What about > ... LIKE '%' || X'00' || '%' > or even > ... LIKE X'250025' Doesn't work. That's the first thing I tried. It

[sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Sidney Cadot
Hi all, Is the way in which SQLite handlesNaN and Infinity values as defined by IEEE-754 documented somewhere? I would also be interested to find a discussion of the rationale behind the design decisions. After some experimenting, it appears that ... * SELECT 1.0 / 0.0 yields NULL (where I

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Simon Slavin
On 5 Jun 2011, at 3:35pm, Sidney Cadot wrote: > After some experimenting, it appears that ... > > * SELECT 1.0 / 0.0 yields NULL (where I would expect to see Inf) > * SELECT 1e1 yields an actual IEEE-754 infinity, and it can be > stored in a table > * SELECT 1e1 + 1e1 yields

[sqlite] Howto pivot in SQLite

2011-06-05 Thread Sam Carleton
I have a invoice system where one invoice item can have one or more sum items (images). Example is a CD... The invoice item is a CD, there are an infinite numbers of images associated with that CD invoice item. So I have the following: CREATE TABLE Invoice_Item ( Invoice_Item_Id INTEGER

Re: [sqlite] How to search column ascii containing chr(0)

2011-06-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/05/2011 12:20 AM, iip wrote: > As subject, I want to know how search column that contain ascii chr(0), I > already use google to search but no luck, > > I'm using python language. If you are using APSW then you can define a user defined

Re: [sqlite] Howto pivot in SQLite

2011-06-05 Thread Simon Slavin
On 5 Jun 2011, at 5:47pm, Sam Carleton wrote: > In one select statement, I want to return a view of all the Invoice_Items > for a particular Invoice such that there is one column that contains all the > image names in one string: > > Invoice_Item_Id | Invoice_Id | Description | Image Names >

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Sidney Cadot
> Note that according to SQL semantics, 'NULL' means 'I don't know'. I am not quite sure what you are saying. I am pretty sure that NULL is not defined so informally ... :) > So every value of all types matches with it. I don't understand what "matches with" means in this context, sorry.

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Simon Slavin
On 5 Jun 2011, at 6:10pm, Sidney Cadot wrote: >> Note that according to SQL semantics, 'NULL' means 'I don't know'. > > I am not quite sure what you are saying. I am pretty sure that NULL is > not defined so informally ... :) I expressed it in a short way, but I think it's a fair summary.

Re: [sqlite] Do I need to migrate to MySQL?

2011-06-05 Thread Dagdamor
Matthew L. Creech писал(а) в своём письме Sat, 04 Jun 2011 02:26:09 +0600: > Coincidentally, I happened to be reading over this page just earlier today: > > http://wiki.postgresql.org/wiki/Why_PostgreSQL_Instead_of_MySQL_2009 > > Obviously a bit biased toward PostgreSQL

Re: [sqlite] Howto pivot in SQLite

2011-06-05 Thread Sam Carleton
On Sun, Jun 5, 2011 at 1:04 PM, Simon Slavin wrote: > > Take a look at the group_concat() function: > > http://www.sqlite.org/lang_aggfunc.html > That is PERFECT, thank you! If the person who thought of this function originally is reading this, thank you!!! What a time

Re: [sqlite] Do I need to migrate to MySQL?

2011-06-05 Thread Joe D
On 2011-06-05 12:26, Dagdamor wrote: > If you need a non-transactional (atomic)... > If you need transactions (although in most of the web cases you don't need > them)... Non-transactional is by definition not atomic. With the single exception of something that is strictly read-only, I have

Re: [sqlite] Howto pivot in SQLite

2011-06-05 Thread Jay A. Kreibich
On Sun, Jun 05, 2011 at 12:47:47PM -0400, Sam Carleton scratched on the wall: > In one select statement, I want to return a view of all the Invoice_Items > for a particular Invoice such that there is one column that contains all the > image names in one string: > > Invoice_Item_Id | Invoice_Id |

Re: [sqlite] Howto pivot in SQLite

2011-06-05 Thread Sam Carleton
On Sun, Jun 5, 2011 at 5:44 PM, Jay A. Kreibich wrote: > On Sun, Jun 05, 2011 at 12:47:47PM -0400, Sam Carleton scratched on the > wall: > > > In one select statement, I want to return a view of all the Invoice_Items > > for a particular Invoice such that there is one column that

Re: [sqlite] Do I need to migrate to MySQL?

2011-06-05 Thread Darren Duncan
Darren Duncan wrote: > MySQL should be avoided like the plague. I hereby retract my above-quoted statement as I realize that it is too severe a statement to be making. Instead I will say the following in its place: MySQL should not be considered as the default choice of a non-lite SQL DBMS,

Re: [sqlite] Do I need to migrate to MySQL?

2011-06-05 Thread Dagdamor
Joe D писал(а) в своём письме Mon, 06 Jun 2011 00:57:51 +0600: > Non-transactional is by definition not atomic. > > With the single exception of something that is strictly read-only, I > have never, ever, seen any database application that did not need > transactions. Ever. > >

Re: [sqlite] Do I need to migrate to MySQL?

2011-06-05 Thread Dagdamor
Darren Duncan писал(а) в своём письме Mon, 06 Jun 2011 05:08:45 +0600: > MySQL should not be considered as the default choice of a non-lite SQL DBMS, > for > projects not currently using it, when you have a choice between multiple SQL > DBMSs; instead, the default

[sqlite] Sqlite shell text wrapping?

2011-06-05 Thread Kyle Malloy
After creating a Database.sqlite i then create a Table and try to past text from a text file into the shell, but the text wraps? Im working on an iphone app and im new to it all. Ive been reading lots of tutorials and it seems that everyone builds databases this way. I have just under 4,000

Re: [sqlite] Do I need to migrate to MySQL?

2011-06-05 Thread Darren Duncan
Dagdamor wrote: > Darren Duncan писал(а) в своём письме Mon, 06 Jun > 2011 05:08:45 +0600: >> MySQL should not be considered as the default choice of a non-lite SQL >> DBMS, for projects not currently using it, when you have a choice between >> multiple SQL DBMSs;

Re: [sqlite] Howto pivot in SQLite

2011-06-05 Thread BareFeetWare
On 06/06/2011, at 8:30 AM, Sam Carleton wrote: > allow the user to select the line and bring up a secondary dialog to manage > the list of images You could simply execute a second select when the user asks for the set of images for that invoice. It's simpler and

Re: [sqlite] Do I need to migrate to MySQL?

2011-06-05 Thread Simon Slavin
On 6 Jun 2011, at 12:20am, Dagdamor wrote: > Darren Duncan писал(а) в своём письме Mon, 06 Jun > 2011 05:08:45 +0600: > >> MySQL should not be considered as the default choice of a non-lite SQL DBMS, >> for >> projects not currently using it, when you have a choice

Re: [sqlite] Sqlite shell text wrapping?

2011-06-05 Thread Simon Slavin
On 6 Jun 2011, at 12:41am, Kyle Malloy wrote: > After creating a Database.sqlite i then create a Table and try to past text > from a text file into the shell, but the text wraps? Im working on an iphone > app and im new to it all. Kyle, first, do not use directional quotes in SQLite. Use

Re: [sqlite] Sqlite shell text wrapping?

2011-06-05 Thread BareFeetWare
On 06/06/2011, at 9:41 AM, Kyle Malloy wrote: > After creating a Database.sqlite i then create a Table and try to past text > from a text file into the shell, but the text wraps? Im working on an iphone > app and im new to it all. Ive been reading lots of tutorials and it seems > that everyone

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Sidney Cadot
Hi Jay, >  However, it is worth remembering that IEEE 754 is really about building >  processors, not about end-user interaction.  While it is a rigid, >  formal specification of a numeric environment, at its heart it is >  about mechanics, not about consistent mathematical systems built on >  

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Sidney Cadot
Hi Simon, > "Null is a special marker used in Structured Query Language (SQL) to indicate > that a data value does not exist in the database." To me, this statement does not apply to "NaN", which is a perfectly fine (albeit unusual) floating point value. > If you compare anything with NULL,

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Simon Slavin
On 6 Jun 2011, at 3:02am, Sidney Cadot wrote: > Hi Jay, > >> As others have pointed out, one of the meanings of NULL is essentially >> "unknown." > > Yes, but in terms of IEEE-754, there exist no "unknown" results Jay is talking about SQL. SQL /does/ use NULL for 'unknown'. And the OP was

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Sidney Cadot
Hi Simon, > Jay is talking about SQL.  SQL /does/ use NULL for 'unknown'. Well yes, it does, but my entire point is that floating point NaN is quite different from "Unknown". SQLite sort-of unifies NaN and NULL (although this isn't documented). However, this is not an SQL choice -- it is an

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Simon Slavin
On 6 Jun 2011, at 3:38am, Sidney Cadot wrote: >> And the OP was trying to match values with NULL. > > Actually, no, I was asking how SQlite behaves with respect to IEEE-754 > floating point. But you were using a SQL command to make the match. Here it one of them: On 5 Jun 2011, at 3:35pm,

Re: [sqlite] Handling of IEEE-754 nan and +/-inf in SQLite?

2011-06-05 Thread Sidney Cadot
Hi Simon, > But you were using a SQL command to make the match. Well, I was using it to demonstrate some behavior I observed, yes. I was not "matching values with NULL". But whatever. > You executed a SELECT command and got an answer from SQL.  That answer does > not mean > "The result of the