Hi Darren,
It seems to me that you have a flawed design.
Displaying sparse like that should be a function of your
application display code, not the database
I had to chuckle that when I asked "How do I use this to do that",
your solution was "you shouldn't have that and you should do it
Hi Simon,
Here's a less gruesome version - no cases. I've given no thought to
performance comparisons.
Thanks for the two great solutions you posted. They certainly achieve
the desired result with the simplified sample I gave. However, in the
broader reality, it doesn't quite satisfy my
I realize that FTS1/2 has this slight flaw with the text indexes recording
the _rowid_ of a table, in the expectation that a rowid was permanent. That
would have caught me unawares, as in Oracle a ROWID is permanent... even if
the row has migrated, there's a migrate record at the place where the
I also discovered that I can just use the "-header" and "-column"
qualifiers before specifying the DB name. And, apparently, you can even
epscify the init file with "-init".(foolish me, I was looking for this
type of info before using "-h".. not "-help").
-dave
-Original Message-
Hi:
I found nothing on the official sqlite website (sqlite.org) regarding
the sqlite.init file. Did I miss something? Are there other (better)
documentation resources other than the documentation link on sqlite.org?
SPecifically, I'm trying to either point sqlite3 to a specific
sqlite.init
--- "Gauthier, Dave" <[EMAIL PROTECTED]> wrote:
> But how can I ".mode column" and ".header on" as well as run the query
If you're using bash (ksh and sh might work as well):
$ echo -e ".header on\n.mode column\nselect * from sqlite_master;" | ./sqlite3
abc.db
typenametbl_name
Yes, the sql works. (Thanks James)
But how can I ".mode column" and ".header on" as well as run the query
(given that I'm developing this for others to use and don't want to make
them create/edit a ~/sqlite.init with those elements)
-dave
-Original Message-
From: James Dennett
On Wed, 22 Aug 2007, Gauthier, Dave wrote:
On Linux...
How can I execute a sql command against a sqlite DB straight from the
command line. Somethign like
sqlite3 foo.sqldb -e "select * from mytable"
or...
sqlite3 foo.sqldb < "select * from mytable"
Dave,
Write a script. If
On Linux...
How can I execute a sql command against a sqlite DB straight from the
command line. Somethign like
sqlite3 foo.sqldb -e "select * from mytable"
or...
sqlite3 foo.sqldb < "select * from mytable"
(only these don't work)
Also, can I prefix with a setup option
Hi Tom,
Here's a less gruesome version - no cases. I've given no thought to
performance comparisons.
C:\Joinerysoft\JMS\dev\trunk> sqlite3 tst.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> insert into List values( 'a' );
sqlite> insert into List values( 'a' );
sqlite> insert
Ok this is how I got the fts working in python and .net...
In python 2.5 sqlite3 is automatically included as a builtin. However I
could not find any method which loads the extention or to enable it,
I COULD do it in SQL by using:
conn.cursor().execute("SELECT load_extension('fts2')")
Hi Tom,
Its a pretty gruesome bit of sql...
C:\Joinerysoft\JMS\dev\trunk> sqlite3 tst.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> create table List( Code text );
sqlite> insert into List values( 'a' );
sqlite> insert into List values( 'a' );
sqlite> insert into List values(
More on to my earlier email,
I believe SQLite already uses those flags, I haven't done the testing
myself, but it is claimed SQLite is able to create rather large databases
(in terms of TBs) without any fuss,
Regards,
Jayavasanthan J
On 8/22/07, J Jayavasanthan <[EMAIL PROTECTED]> wrote:
>
> Hi
Hi Victor,
Normally the large file creation should not fail on the 32 bit builds. And
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 will create other side effects
such as off_t getting to long long rather than long and similar with size_t
(I guess).
The solution is to access/create the file along
It seems to me that you have a flawed design.
You should just have a 2 column database to begin with, with a table like this:
Code Count
a 4
b 2
c 3
Rather than plain inserting or deleting rows, just sometimes insert
or delete, you should instead increment or decrement
15 matches
Mail list logo