Re: [sqlite] Adding data with periods

2008-12-15 Thread Eric Bohlman
Mohd Radzi Ibrahim wrote: > It seems to works either way. > > I'm just wondering is there any hidden reason that single quote is > preferred? Portability? > Or is double-qoute has some kind of special meaning that we should use it > for that special purpose? If what's enclosed in the double

Re: [sqlite] Adding data with periods

2008-12-15 Thread Chris Wedgwood
On Sun, Dec 14, 2008 at 11:04:56PM -0600, aditya siram wrote: > sqlite> create table test_table ("Contents" varchar); > sqlite> insert into test_table "hello . world"; > SQL error: near ""hello . world"": syntax error insert into test_table values("hello . world");

Re: [sqlite] Adding data with periods

2008-12-15 Thread Eugene Wee
Additionally, double quotes do have a "special meaning" in that they are used to delimit identifiers. Regards, Eugene On Mon, Dec 15, 2008 at 3:15 PM, John Stanton wrote: > Single quotes are SQL, as chosen by he designers. It is good practice > to stick to the standard

Re: [sqlite] Adding data with periods

2008-12-14 Thread John Stanton
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Sent: Monday, December 15, 2008 1:32 PM > Subject: Re: [sqlite] Adding data with periods > > > >> On 12/14/08, aditya siram <aditya.si...@gmail.com> wrote: >> &

Re: [sqlite] Adding data with periods

2008-12-14 Thread Mohd Radzi Ibrahim
t; <punk.k...@gmail.com> To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> Sent: Monday, December 15, 2008 1:32 PM Subject: Re: [sqlite] Adding data with periods > On 12/14/08, aditya siram <aditya.si...@gmail.com> wrote: >> Thanks a lot. The issue

Re: [sqlite] Adding data with periods

2008-12-14 Thread P Kishor
On 12/14/08, aditya siram wrote: > Thanks a lot. The issue has been fixed with: > INSERT INTO TEST_TABLE(CONTENTS) VALUES ("Hello. World!"); > Use single quotes to delimit text, not double quotes. ___ sqlite-users mailing list

Re: [sqlite] Adding data with periods

2008-12-14 Thread aditya siram
Thanks a lot. The issue has been fixed with: INSERT INTO TEST_TABLE(CONTENTS) VALUES ("Hello. World!"); I was thrown by the error message that seemed to be complaining about the periods when I was actually missing the VALUES(...) clause. Appreciate the quick response ... deech On Sun, Dec 14,

Re: [sqlite] Adding data with periods

2008-12-14 Thread John Stanton
Note that literal delimiters in SQL are single quotes, e.g. 'This is an SQL literal'. It is good practice with Sqlite to use bound variables. You avoid possible SQL injection attacks and limit sensitivity to data content. aditya siram wrote: > Hi all, > I'm having trouble adding data with

Re: [sqlite] Adding data with periods

2008-12-14 Thread Mohd Radzi Ibrahim
The syntax is wrong. INSERT INTO TEST_TABLE(CONTENTS) VALUES ("Hello. World!"); is the correct one. -radzi- - Original Message - From: "aditya siram" <aditya.si...@gmail.com> To: <sqlite-users@sqlite.org> Sent: Monday, December 15, 2008 1:04

Re: [sqlite] Adding data with periods

2008-12-14 Thread P Kishor
On 12/14/08, aditya siram wrote: > Hi all, > I'm having trouble adding data with period characters in it. I tries to > escape the period with a `'` but that didn' t seem to work. Here is an > example interaction: > > sqlite> create table test_table ("Contents"

Re: [sqlite] Adding data with periods

2008-12-14 Thread kirrthana
-users-boun...@sqlite.org]on Behalf Of aditya siram Sent: Monday, December 15, 2008 10:35 AM To: sqlite-users@sqlite.org Subject: [sqlite] Adding data with periods Hi all, I'm having trouble adding data with period characters in it. I tries to escape the period with a `'` but that didn' t seem

[sqlite] Adding data with periods

2008-12-14 Thread aditya siram
Hi all, I'm having trouble adding data with period characters in it. I tries to escape the period with a `'` but that didn' t seem to work. Here is an example interaction: sqlite> create table test_table ("Contents" varchar); sqlite> insert into test_table "hello . world"; SQL error: near ""hello