Re: [sqlite] Is there a way to return the row number? (NOT the rowid)

2013-07-02 Thread James K. Lowden
On Tue, 02 Jul 2013 10:01:23 +0200 Gabriel Corneanu wrote: > > Ranking the rows requires nothing more than joining the table to > > itself. > Indeed, that's the case. However, I can't imagine this to be > efficient. It's just a pure sql workaround to a counter. I

Re: [sqlite] Is there a way to return the row number? (NOTthe rowid)

2013-07-02 Thread James K. Lowden
On Mon, 1 Jul 2013 23:30:10 -0500 "Jay A. Kreibich" wrote: > While rearranging the column order may not functionally change the > answer, a database is not given that flexibility in SQL. For > example, "SELECT *" *must* return the columns in the order they are > defined

Re: [sqlite] Getting Constraints Details

2013-07-02 Thread danap
For some reason I'm using a more complicated version of that same query for constraints. Perhaps its based on some older information that may have been in the table. SELECT type, sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type!='meta' AND sql NOT NULL

Re: [sqlite] Sqlite3 Affinity

2013-07-02 Thread RSmith
Please forgive my atrocious typo's - I never use a spellchecker for reasons of personal linguistic pride, which tend to bite me when replying in a hurry. Also, howcome no matter how much I force plaintext format on all mails, it returns as HTML? Does the mailing list have a format specifier

Re: [sqlite] Sqlite3 Affinity

2013-07-02 Thread RSmith
1 - Using SQL there exists an SQLIte function typeof(x) where x can be a column name and it will return the type which is specific to the affinity and not to the original specified type when creating the table. If on the other hand you simply wish to know which type supports which affinity, this

Re: [sqlite] Sqlite3 Affinity

2013-07-02 Thread Hick Gunter
There are sqlite3_column_decltype() and sqlite3_column_type() functions to determine the declared and actual types. You can determine affinity via the documentation: 2.1 Determination Of Column Affinity The affinity of a column is determined by the declared type of the column, according to the

Re: [sqlite] UPDATE of many rows is very slow

2013-07-02 Thread Clemens Ladisch
Hinrich Aue wrote: > I believe I have used many ways to speed up the UPDATE of many rows, > But nothing helped so far. > > We open one connection, one transaction, and then we update many rows on the > database. > > var command = new SQLiteCommand(Queries.SQLUpdateDocument, connection); > foreach

[sqlite] Sqlite3 Affinity

2013-07-02 Thread techi eth
Few Query : 1) Is their any function or Method to get Affinity type associated with colum. 2) I understand Integer,Text & Float could satisfy all data type requirement.In that case where i can use blob Or Numeric type. Cheers - Techi ___ sqlite-users

Re: [sqlite] GUI for SQLite

2013-07-02 Thread jorje
RSmith wrote > Well you need to "buy" a $0.00 registration key, for which you need to > fill in an inordinate amount of personal and contact > information (just like buying other things online). The sort of event that > promises Inbox spam aplenty and is too much hassle for > most casual

Re: [sqlite] GUI for SQLite (nobre)

2013-07-02 Thread jorje
Hi Joe, It works quite good for me. It can be installed even from Mac App Store here: https://itunes.apple.com/us/app/valentina-studio/id604825918?ls=1=12 BTW, you can look how it looks on Mac on this video: http://www.youtube.com/watch?v=1wAd1IrwKAs Although something should be improved

[sqlite] UPDATE of many rows is very slow

2013-07-02 Thread Hinrich Aue
Hello sqlite users, I believe I have used many ways to speed up the UPDATE of many rows, But nothing helped so far. We are opening a transaction, like this: private SQLiteTransaction BeginTransaction(SQLiteConnection connection) { return

Re: [sqlite] Another 2 questions about SQLite

2013-07-02 Thread Simon Slavin
On 2 Jul 2013, at 3:33am, James K. Lowden wrote: > Igor Tandetnik wrote: > >> On 6/30/2013 11:13 PM, Igor Korot wrote: >>> Well I will use another statement variable as in the sample code. >>> My questions was: if I call delete on the record that

Re: [sqlite] Is there a way to return the row number? (NOTthe rowid)

2013-07-02 Thread Alex Bowden
The SQL standard has always been a moving feast, chasing the field implementations, perfectly capable of going back on it's earlier mistakes, the main purpose of which, on a good day, is to promote standardisation of SQL implementations and try and keep to the Relational Theory model where

Re: [sqlite] assertion in sqlite 3.7.17 for rather simple SELECT query

2013-07-02 Thread Jens Miltner
Am 01.07.2013 um 20:16 schrieb Richard Hipp: > On Mon, Jul 1, 2013 at 9:20 AM, Jens Miltner wrote: > >> I recently updated our SQLite source to SQLite source distribution 3.7.17. >> Since then, we get assertions when running one of our larger queries. I >> have stripped down the

Re: [sqlite] Is there a way to return the row number? (NOT the rowid)

2013-07-02 Thread Gabriel Corneanu
James, Indeed, that's the case. However, I can't imagine this to be efficient. It's just a pure sql workaround to a counter. The only advantage is, it is standard sql and should work with any engine. I wonder if sqlite would make some optimizations out of it, otherwise it's O(n^2) WHEN

Re: [sqlite] Is there a way to return the row number? (NOT the rowid)

2013-07-02 Thread Gabriel Corneanu
Simon, Of course the rowid is THE field to use to uniquely identify a row (for edit, delete, etc...). I am talking about some ranking a result set. The ranking can be used for displaying (in HTML or a desktop GUI) or as source for insert/update sql. Of course in code you can have your own