Hi,
I have a Sqlite3 pointer. Is there any way to get the filename of this
pointer ?
Regards,
Atul
--
View this message in context:
http://www.nabble.com/Retriving-the-database-name-from-the-sqlite-pointer--tp25020127p25020127.html
Sent from the SQLite mailing list archive at Nabble.com.
2009/8/18 Atul_Vaidya :
>
> Hi,
> I have a Sqlite3 pointer. Is there any way to get the filename of this
> pointer ?
Execute "PRAGMA database_list;"
See http://www.sqlite.org/pragma.html#pragma_database_list
> Regards,
> Atul
Rgds,
Simon
Hello, when converting a .sql file containing MySQL INSERT clauses,
one often runs into the problem that the MySQL INSERT can accept
multiple VALUES arguments:
INSERT INTO actor VALUES (1,'PENELOPE','GUINESS','2006-02-15
04:34:33'),(2,'NICK','WAHLBERG','2006-02-15
To me that seems like an annoying deviation from standard practice. Do other
databases support such an INSERT? Is it envisioned by standards? I suspect the
answer is "no" in both cases, and this is a classic example of how "less"
functionality is actually "more" useful.
That said, if you're in
On Tue, Aug 18, 2009 at 08:28:13AM -0500, Beau Wilkinson scratched on the wall:
> To me that seems like an annoying deviation from standard practice.
> Do other databases support such an INSERT?
Yes. MySQL, PostgreSQL, and SQLServer all support this syntax.
Oracle supports a slightly
>On Tue, Aug 18, 2009 at 08:28:13AM -0500, Beau Wilkinson scratched on the wall:
>> To me that seems like an annoying deviation from standard practice.
>> Do other databases support such an INSERT?
>
>Yes. MySQL, PostgreSQL, and SQLServer all support this syntax.
>
>Oracle supports a slightly
On 18/08/2009 11:28 PM, Beau Wilkinson wrote:
> That said, if you're in posession of the source code,
> you can certainly hack something up to support that.
> A better option might be to pre-process the MySQL file
> using C, Perl, XSLT (just kidding - don't use XSLT)
> or whatever else you
On Tue, Aug 18, 2009 at 09:42:53AM -0500, Beau Wilkinson scratched on the wall:
> >On Tue, Aug 18, 2009 at 08:28:13AM -0500, Beau Wilkinson scratched on the
> >wall:
> > It is also worth noting that every non-SQL Relational language (e.g.
> > Tutorial-D) I've looked at supports some form of
Hello
I thought this query would work to read a date column that holds the
DD-MM- date when the user last logged on, and check how many of
them logged on in the past two weeks for the last time:
SELECT COUNT(id) FROM members WHERE (julianday('now') -
julianday(dateconnection)) < 15;
This is
What is the most efficient way to code either a trigger or the app so that
it increments a "count" field if the "id" field exists?
For example, say you have a table with fields of "id" and "count".
First row is an id of 3, so "count" is set to 1.
Next row is an id of 4, so "count" is set to 1.
On 18 Aug 2009, at 6:06pm, andrew fabbro wrote:
> What is the most efficient way to code either a trigger or the app
> so that
> it increments a "count" field if the "id" field exists?
>
> For example, say you have a table with fields of "id" and "count".
>
> First row is an id of 3, so
Just try these and you'll see why.
sqlite> select julianday('18-08-2009');
sqlite> select julianday('now') - julianday('18-08-2009');
Pavel
On Tue, Aug 18, 2009 at 12:58 PM, Gilles Ganault wrote:
> Hello
>
> I thought this query would work to read a date column that
To expand on things to try:
sqlite> select julianday('now');
sqlite> select julianday('2009-08-01');
sqlite> select julianday('now') - julianday('2009-08-01');
And maybe have a look here:
http://sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
Regards,
- Robert
On Tue, Aug 18, 2009 at 1:25
You can always do
insert into table (id, count) values (?1, (select count(*) + 1 from
table where id = ?1))
Though I'd be cautious about race condition that seems like possible
here when after select returned some value and before insert was made
another process made another insert with the same
On Aug 19, 2009, at 12:35 AM, Pavel Ivanov wrote:
> You can always do
>
> insert into table (id, count) values (?1, (select count(*) + 1 from
> table where id = ?1))
>
> Though I'd be cautious about race condition that seems like possible
> here when after select returned some value and before
On Aug 19, 2009, at 12:54 AM, Dan Kennedy wrote:
>
> On Aug 19, 2009, at 12:35 AM, Pavel Ivanov wrote:
>
>> You can always do
>>
>> insert into table (id, count) values (?1, (select count(*) + 1 from
>> table where id = ?1))
>>
>> Though I'd be cautious about race condition that seems like
> Cannot happen. If not executed within an implicit transaction, each
> SQL statement is effectively wrapped in a transaction all of its own.
So executing the insert/update/delete statement places RESERVED lock
right from the start before executing nested selects?
Pavel
On Tue, Aug 18, 2009 at
On Aug 19, 2009, at 1:01 AM, Pavel Ivanov wrote:
>> Cannot happen. If not executed within an implicit transaction, each
>> SQL statement is effectively wrapped in a transaction all of its own.
>
> So executing the insert/update/delete statement places RESERVED lock
> right from the start before
>> So executing the insert/update/delete statement places RESERVED lock
>> right from the start before executing nested selects?
>
> Yes.
Then I stand corrected. Thank you.
Pavel
On Tue, Aug 18, 2009 at 2:04 PM, Dan Kennedy wrote:
>
> On Aug 19, 2009, at 1:01 AM, Pavel
Running make test resulted in the following failures on aix 5.3
Note that the CFLAGS=-DSQLITE_DISABLE_DIRSYNC was set for the make.
14 errors out of 40926 tests
Failures on these tests: backup2-10 io-4.1 io-4.2.3 nan-1.1.2 nan-1.1.3
nan-1.1.4 nan-1.1.5 nan-1.1.5 nan-4.7 nan-4.8 nan-4.14 nan-4.15
I have searched the list and understand the need for parentheses when
required by logical or arithmetic operations or subselects.
My question is if it makes a difference to use parentheses when not
logically required, as in the following example where the only logical used
is "and":
On 18 Aug 2009, at 10:26pm, yaconsult wrote:
> My question is if it makes a difference to use parentheses when not
> logically required, as in the following example where the only
> logical used
> is "and":
>
>select * from log
>where
> (response >= 200 and
Simon,
Thank you for the optimization. I'll switch to using between. This
particular database is used for generating some statistics and generating
reports, so performance is not that big an issue.
When you talk about "clever use of an index", are you referring to a
combined index or merely
On Aug 18, 2009, at 5:26 PM, yaconsult wrote:
>
> My question is if it makes a difference to use parentheses when not
> logically required, as in the following example where the only
> logical used
> is "and":
>
>select * from log
>where
> (response >= 200
Hey everyone,
The documentation for sqlite3_column_text() states that
the string returned will always be NULL and that the pointers are valid
until sqlite3_step(), sqlite3_reset() or sqlite3_finalize() is called.
Is this ONLY when the same prepared statement is used in those
On 19 Aug 2009, at 12:01am, yaconsult wrote:
> Simon,
>
> Thank you for the optimization. I'll switch to using between. This
> particular database is used for generating some statistics and
> generating
> reports, so performance is not that big an issue.
DRH's post trumps mine, of course.
2009/8/18 Terrence Brannon :
> Hello, when converting a .sql file containing MySQL INSERT clauses,
> one often runs into the problem that the MySQL INSERT can accept
> multiple VALUES arguments:
>
>INSERT INTO actor VALUES (1,'PENELOPE','GUINESS','2006-02-15
>
On 19/08/2009 11:26 AM, Simon Slavin wrote:
> DRH's post trumps mine, of course. I'm surprised to find that
> brackets are optimised out of WHERE evaluations.
Why? In the OP's example (all AND operators) the parentheses are
redundant. In SQL, AND and OR are not guaranteed to be
andrew fabbro wrote:
> What is the most efficient way to code either a trigger or the app so
> that it increments a "count" field if the "id" field exists?
>
> For example, say you have a table with fields of "id" and "count".
>
> First row is an id of 3, so "count" is set to 1.
> Next row is an
On Tue, Aug 18, 2009 at 3:28 PM, Ken wrote:
> Running make test resulted in the following failures on aix 5.3
> Note that the CFLAGS=-DSQLITE_DISABLE_DIRSYNC was set for the make.
>
> 14 errors out of 40926 tests
> Failures on these tests: backup2-10 io-4.1 io-4.2.3
30 matches
Mail list logo