[sqlite] 访问我的图片

2011-08-08 Thread 邓超
嗨, 我创建了一个Netlog个人主页,其中包括我的图片、视频、博客和活动。非常希望邀请你成为我的朋友,一起共享我们的天地。这需要你先在Netlog上注册哦!在登录后,你也可以创建属于自己的个人主页了。 看一看: http://zh.netlog.com/go/mailurl/-bT0yODcxNjc1NTcmbD0xJmdtPTEyJnU9JTJGZ28lMkZyZWdpc3RlciUyRmlkJTNELWMzRnNhWFJsTFhWelpYSnpRSE54YkdsMFpTNXZjbWNfJTI2dWlkJTNEMTM2NTAyOTcz 祝好, 邓超

Re: [sqlite] exists clause in select

2011-08-08 Thread Kees Nuyt
On Mon, 08 Aug 2011 07:50:21 +0200, William Canfield wrote: >Hi, >I am having trouble writing a select statement. What I want to do is this: > >SELECT * FROM customers WHERE NOT EXISTS (SELECT * FROM orders WHERE >customers.id = orders.cust_id); > >Is this possible at all

Re: [sqlite] In memory v/s tmpfs

2011-08-08 Thread Pavel Ivanov
> What could be a possible explanation for this behaviour? > One difference int configurations is that the sqlite lib is built for > multithreading in the tmpfs scenario. Could it be an overhead of mutexes? Make tests with the same SQLite library. Run test with tmpfs using strace to see if

[sqlite] In memory v/s tmpfs

2011-08-08 Thread sreekumar . tp
HI, I performed an experiment where I do db operations on an in-memory database and compared it with the results from same operations on a database in tmpfs.(Same db structure,records etc) >From the point of view of performance, I expected similar performance , tmpfs >being a little slower

Re: [sqlite] %Q vs. %q

2011-08-08 Thread Igor Tandetnik
Baruch Burstein wrote: > What is the difference between > >> mprintf("insert into a values(%Q);", val); >> > and > >> mprintf("insert into a values('%q');", val); Read the fine manual: http://www.sqlite.org/c3ref/mprintf.html The %Q option works like %q except it also

Re: [sqlite] exists clause in select

2011-08-08 Thread Martin.Engelschalk
Hi, this seems like correct SQL to me. SQLite should execute it. Doesn't it work? Martin Am 08.08.2011 07:50, schrieb William Canfield: > Hi, > I am having trouble writing a select statement. What I want to do is this: > > SELECT * FROM customers WHERE NOT EXISTS (SELECT * FROM orders WHERE >

[sqlite] exists clause in select

2011-08-08 Thread William Canfield
Hi, I am having trouble writing a select statement. What I want to do is this: SELECT * FROM customers WHERE NOT EXISTS (SELECT * FROM orders WHERE customers.id = orders.cust_id); Is this possible at all in Sqlite? regards W. Canfield ___

[sqlite] Build tables on the fly

2011-08-08 Thread LiranR
Hi!! I am using SQLite in an embedded device. The device writes a lot of values to a lot of tables every 3 seconds. Sometime, i want to add parameters to the DB, but i dont want to disturb the on-going operation of writing to the DB every 3 seconds. In order to prevent fragmentation, i build the

Re: [sqlite] %Q vs. %q

2011-08-08 Thread Simon Slavin
On 8 Aug 2011, at 10:58am, Simon Davies wrote: >>> The '%q' signifies a 64-bit integer expressed as hex. My guess about >>> capital Q vs. lower-case q is that one uses A-F and the other uses a-f for >>> 10 to 15. >>> >>> Simon. [Slavin] > > http://www.sqlite.org/c3ref/mprintf.html Which

Re: [sqlite] %Q vs. %q

2011-08-08 Thread Simon Davies
On 8 August 2011 10:45, Baruch Burstein wrote: > Sorry, I meant sqlite3_mprintf > > On Mon, Aug 8, 2011 at 12:40 PM, Simon Slavin wrote: > >> >> On 8 Aug 2011, at 10:35am, Baruch Burstein wrote: >> >> > What is the difference between >> > >> >>

Re: [sqlite] %Q vs. %q

2011-08-08 Thread Baruch Burstein
Sorry, I meant sqlite3_mprintf On Mon, Aug 8, 2011 at 12:40 PM, Simon Slavin wrote: > > On 8 Aug 2011, at 10:35am, Baruch Burstein wrote: > > > What is the difference between > > > >> mprintf("insert into a values(%Q);", val); > > > > and > > > >> mprintf("insert into a

Re: [sqlite] %Q vs. %q

2011-08-08 Thread Simon Slavin
On 8 Aug 2011, at 10:35am, Baruch Burstein wrote: > What is the difference between > >> mprintf("insert into a values(%Q);", val); > > and > >> mprintf("insert into a values('%q');", val); > > If there is no difference, why have two almost identical things? The '%q' signifies a 64-bit

[sqlite] %Q vs. %q

2011-08-08 Thread Baruch Burstein
What is the difference between > mprintf("insert into a values(%Q);", val); > and > mprintf("insert into a values('%q');", val); > If there is no difference, why have two almost identical things? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Using Comand Lines inside a program

2011-08-08 Thread Baruch Burstein
Have a look at the shell.c file. The relevant code is at line 1655 in the latest version (in the 3.7.7.1 amalgamation .zip file). It is only about 120 lines, and most of it you could probably cut out in your own program (all the errors and processing for the command line. You can just substitute

Re: [sqlite] Feature request: extend the IN operator

2011-08-08 Thread Alexey Pechnikov
2011/8/8 Simon Slavin : > You're quite right.  If someone was going to write that functionality into a > SQLite app in real life they'd probably use 'LIKE' or 'GLOB' and store all > the possibilities in one row. FTS3/FTS4 is better as index for lists. See my test script