consider this:
SELECT * FROM table_name WHERE column_name in(1,2,3) or column_name is
NULL
Here column name is referenced two times.
Putting it this way:
SELECT * FROM table_name WHERE column_name in(1,2,3,null)
causes that in() ignores null value without giving any error.
I need to add l
If you know for sure column_name won't contain a certain value, for
example -1, you could do something like this.
select * from table_name where coalesce(column_name, -1) in (1,2,3,-1);
On 2 July 2011 10:21, yogibabu wrote:
>
> consider this:
> SELECT * FROM table_name WHERE column_name in(1,2
On Sat, 2 Jul 2011 12:27:07 +0800, "airwolf2026"
wrote:
>Hello,
>
> Can current version support wal mode?
Yes.
> I try this by add
> "Pragram journal mode = wal;" in connection string;
> but it doesn't take effect?
> how can i do that ?
It's not something you do in a connection string, and you
Hi Kees ,
Thanks for reply,Yes the 'PRAGMA ' is my fault to'program',i use the C# wrapper
aka "System.Data.Sqlite.dll",When I use it to open
a sqlite.db,the sqlite openned in the normal mode(PRAGMA jounal_mode='Delete',I
had downloaded the newest version ,my question is current release
'System.
On Sat, 2 Jul 2011 17:00:57 +0800, "airwolf2026"
wrote:
> Hi Kees ,
> Thanks for reply,Yes the 'PRAGMA ' is my fault to'program',
> i use the C# wrapper aka "System.Data.Sqlite.dll",When I
> use it to open a sqlite.db,the sqlite openned in the normal
> mode(PRAGMA jounal_mode='Delete', I had down
Is there any way to perform the equivalent of an INSERT OR UPDATE statement?
I have something like this:
CREATE TABLE t1 (id INTEGER PRIMARY KEY, value INTEGER);
CREATE TABLE t2 (parent INTEGER REFERENCES t1 ON DELETE CASCADE, child
INTEGER REFERENCES t1);
INSERT INTO t1 VALUES(1,100);
INSERT INT
Vitali Kiruta wrote:
> If you know for sure column_name won't contain a certain value, for
> example -1, you could do something like this.
>
> select * from table_name where coalesce(column_name, -1) in (1,2,3,-1);
And if you don't, you can just pick one of the values already in the list:
selec
If you can build your SQL string with column_name exactly what is the problem
with adding it a 2nd time?
How do you build your SQL statement?
And I get the same answer with either of your queries in 3.7.4 -- what version
are you running and what answer are you getting?
Are you saying that
Michael,
>Are you saying that "1" below doesn't show up in the first query result?
>
>sqlite> create table t(i int,name string);
>sqlite> insert into t values(1,NULL);
>sqlite> insert into t values(2,'two');
>sqlite> select * from t where i in (1,2,3,null);
>i|name
>1|
>2|two
>sqlite> select * fro
That would 'splain it...I should have noticed...
So we're left with this question...
What's the problem with building the query that works? I don't see where you
can't make it "column agnostic"...though perhaps there's another definition of
that
sprintf(sql,"select * from t where %s i
A quick message to confirm that you method to re-compile SQLite.NET
using the static CRT library (/MT) has worked perfectly and has been
possible using Visual C++ 2010 Express.
Thanks a lot!
Le 23/06/2011 18:38, Random Coder a écrit :
> On Thu, Jun 23, 2011 at 9:27 AM, Cyrille wrote:
>> Than
I am not sure if it is a SQLite problem, or a Java problem.
While filling a table I get an error "Statement is not executing". It
happens in the following code:
System.out.printf("%d, %s, %s\n", line, citation, author);
prep.setString(1, citation);
S
2011/7/2 Kees Nuyt :
> Just feed it the SQL statement:
> PRAGMA jounal_mode=WAL;
I'm not being nasty here, but that is *_not_* an SQL statement.
It is a C directive (or, at least, that's what I think it is!).
Rgs,
Paul...
--
lineh...@tcd.ie
Mob: 00 353 86 864 5772
___
On 3 Jul 2011, at 12:19am, Cecil Westerhof wrote:
> I am not sure if it is a SQLite problem, or a Java problem.
>
> While filling a table I get an error "Statement is not executing". It
> happens in the following code:
>System.out.printf("%d, %s, %s\n", line, citation, author);
>
Paul
Like the old saying goes ... "When all else fails, read the manual."
http://www.sqlite.org/pragma.html
Have a nice day.
Danny
>
>From: Paul Linehan
>To: sqlite-users@sqlite.org
>Sent: Saturday, July 2, 2011 7:51 PM
>Subject: Re: [sqlite] current version s
2011/7/3 Danny :
> Like the old saying goes ... "When all else fails, read the manual."
> http://www.sqlite.org/pragma.html
Oooops
However, I would argue that this
"The PRAGMA statement is an SQL extension specific to SQLite"
is the equivalent of saying that T-SQL or PL/SQL is SQL, it is
16 matches
Mail list logo