Re: [sqlite] Column names in SQL
On Mon, Jun 28, 2010 at 10:07 AM, Serdar Genc wrote: > I have already tried it but not working.. :( > Works for me. punk...@lucknow ~$sqlite3 -- Loading resources from /Users/punkish/.sqliterc SQLite version 3.6.23 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> CREATE TABLE t ("a[b]"); sqlite> INSERT INTO t VALUES ('foo'); sqlite> INSERT INTO t VALUES (3); sqlite> SELECT * FROM t; a[b] -- foo 3 sqlite> SELECT "a[b]" FROM t WHERE "a[b]" = 3; a[b] -- 3 sqlite> You are doing something else. You are not describing the entire problem. How are you accessing your database? > On Mon, Jun 28, 2010 at 6:01 PM, P Kishor wrote: > >> On Mon, Jun 28, 2010 at 9:58 AM, Serdar Genc >> wrote: >> > Hi everyone, >> > >> > I have a problem related to column names . I have a column name as a[b] >> in >> > my table but >> > this creates a problem when using SELECT statement as >> > SELECT a[b] from Table. I know [] is a special character but How would I >> > tell SQlite that field >> > name is a[b] and I am not using [] with a special purpose.. >> >> Try SELECT "a[b]" >> >> >> > >> > Thanks in advance, >> > Serdar >> > ___ >> > sqlite-users mailing list >> > sqlite-users@sqlite.org >> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > >> >> >> >> -- >> Puneet Kishor http://www.punkish.org >> Carbon Model http://carbonmodel.org >> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org >> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor >> Nelson Institute, UW-Madison http://www.nelson.wisc.edu >> --- >> Assertions are politics; backing up assertions with evidence is science >> === >> ___ >> sqlite-users mailing list >> sqlite-users@sqlite.org >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> > > > > -- > > Serdar Genç > web: http://www.iptakip.com > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Column names in SQL
I have already tried it but not working.. :( On Mon, Jun 28, 2010 at 6:01 PM, P Kishor wrote: > On Mon, Jun 28, 2010 at 9:58 AM, Serdar Genc > wrote: > > Hi everyone, > > > > I have a problem related to column names . I have a column name as a[b] > in > > my table but > > this creates a problem when using SELECT statement as > > SELECT a[b] from Table. I know [] is a special character but How would I > > tell SQlite that field > > name is a[b] and I am not using [] with a special purpose.. > > Try SELECT "a[b]" > > > > > > Thanks in advance, > > Serdar > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > -- > Puneet Kishor http://www.punkish.org > Carbon Model http://carbonmodel.org > Charter Member, Open Source Geospatial Foundation http://www.osgeo.org > Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor > Nelson Institute, UW-Madison http://www.nelson.wisc.edu > --- > Assertions are politics; backing up assertions with evidence is science > === > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Serdar Genç web: http://www.iptakip.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Column names in SQL
On Mon, Jun 28, 2010 at 9:58 AM, Serdar Genc wrote: > Hi everyone, > > I have a problem related to column names . I have a column name as a[b] in > my table but > this creates a problem when using SELECT statement as > SELECT a[b] from Table. I know [] is a special character but How would I > tell SQlite that field > name is a[b] and I am not using [] with a special purpose.. Try SELECT "a[b]" > > Thanks in advance, > Serdar > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Column names in SQL
Hi everyone, I have a problem related to column names . I have a column name as a[b] in my table but this creates a problem when using SELECT statement as SELECT a[b] from Table. I know [] is a special character but How would I tell SQlite that field name is a[b] and I am not using [] with a special purpose.. Thanks in advance, Serdar ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users