Re: [sqlite] cann't work

2012-07-11 Thread Hector Guilarte
I am going to quote Drake Wilson, from a thread a couple days old
("[sqlite] DELETE only deletes some records, not others"):

"Aside from the more immediately relevant aspects the other posters
already mentioned, remember that double quotation marks in SQL are
normally used for _identifiers_.  For string literals, use single
quotation marks.  SQLite will sort of autocorrect the former into the
latter sometimes, but it is not good practice to rely on this."



On Wed, Jul 11, 2012 at 2:36 PM, Rob Richardson wrote:

> Does SQLite care about the use of double quotes instead of single quotes?
>
> RobR
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:
> sqlite-users-boun...@sqlite.org] On Behalf Of Simon Davies
> Sent: Wednesday, July 11, 2012 5:10 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] cann't work
>
> On 11 July 2012 10:00, YAN HONG YE  wrote:
> > two same structure tables, when use this sql:
> > insert into table2  values(select * from table1 where filename like
> "%55");
> >
> > but show error: sqlite error 1 - near "select": syntax error
>
> insert into table2 select * from table1 where filename like "%55";
>
> http://www.sqlite.org/lang_insert.html
>
> Regards,
> Simon
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] cann't work

2012-07-11 Thread Rob Richardson
Does SQLite care about the use of double quotes instead of single quotes?

RobR

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Simon Davies
Sent: Wednesday, July 11, 2012 5:10 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] cann't work

On 11 July 2012 10:00, YAN HONG YE  wrote:
> two same structure tables, when use this sql:
> insert into table2  values(select * from table1 where filename like "%55");
>
> but show error: sqlite error 1 - near "select": syntax error

insert into table2 select * from table1 where filename like "%55";

http://www.sqlite.org/lang_insert.html

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] cann't work

2012-07-11 Thread Simon Davies
On 11 July 2012 10:00, YAN HONG YE  wrote:
> two same structure tables, when use this sql:
> insert into table2  values(select * from table1 where filename like "%55");
>
> but show error: sqlite error 1 - near "select": syntax error

insert into table2 select * from table1 where filename like "%55";

http://www.sqlite.org/lang_insert.html

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] cann't work

2012-07-11 Thread YAN HONG YE
two same structure tables, when use this sql:
insert into table2  values(select * from table1 where filename like "%55");

but show error: sqlite error 1 - near "select": syntax error
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users