On 21 Jul 2013, at 12:20am, Igor Tandetnik <i...@tandetnik.org> wrote:

> On 7/20/2013 5:33 PM, V.Krishn wrote:
>> following works:
>> attach database 'file:test.db' as 'test'; #OK
>> select * from test.employees limit 1; #OK
>> 
>> but,
>> attach database 'file:test.db' as '123test'; #OK
>> select * from 123test.employees limit 1; #Gives error
> 
> Try
> 
> select * from "123test".employees limit 1;
> 
> A name that's not a valid identifier (a sequence of letters and digits 
> beginning with a letter) should be enclosed in double quotes.

The problem here is that various tutorials have shown incorrect examples for 
the thing after the 'AS'.  Some show it without quotes, and some show it with 
single quotes.  If I understand correctly the intention of the developers is 
that the name should not be quoted.

I will forecast that you have problems with database names beginning with a 
digit.  I wouldn't do that.  It's going to lead to parsing problems in other 
statements.


On 21 Jul 2013, at 12:20am, V.Krishn <vkris...@gmail.com> wrote:

> I think, to keep things simple, I would leave the quotes out and add a string 
> (eg. d1305).

Very good.

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

Reply via email to