On Fri, Oct 11, 2013 at 7:57 AM, Alexander Syvak <alexander....@gmail.com>wrote:

> Hello,
>
> I am using the @ as a column name delimeter. For instance, if there's a
> table named woman, then a column describing the size of hips should be
> named woman@hip_size.
>
> There's a table created using
> CREATE TABLE country
> (
>     'country@id' INTEGER,
>     'country@name' TEXT,
>     'country@printable'_name TEXT,
>

Either quote the entire name or none of it.  The fact that you ended the
quote mid-name causes the name to be parsed as two separate tokens:

      "country@printable"  _name  TEXT,

Hence the column name is "country@printable" and the datatype is "_name
TEXT".

Also, you should be using double-quotes not single-quotes for quoting
column names.




>     'country@iso2' TEXT,
>     'country@iso3' TEXT,
>     'country@numcode' INTEGER,
>     CONSTRAINT PK_country PRIMARY KEY ('country@id')
> )
>
> After execution of the next query
> pragma table_info('country');
> Sqliteman 1.2.2 yields
> <html>
> <header>
> <title>Sqliteman export</title>
> </header>
> <body>
> <table border="1">
>
> <tr><th>cid</th><th>name</th><th>type</th><th>notnull</th><th>dflt_value</th><th>pk</th></tr>
> <tr><td>0</td><td>country@id
> </td><td>INTEGER</td><td>0</td><td></td><td>1</td></tr>
> <tr><td>1</td><td>country@name
> </td><td>TEXT</td><td>0</td><td></td><td>0</td></tr>
> <tr><td>2</td><td>country@printable</td><td>_name
> TEXT</td><td>0</td><td></td><td>0</td></tr>
> <tr><td>3</td><td>country@iso2
> </td><td>TEXT</td><td>0</td><td></td><td>0</td></tr>
> <tr><td>4</td><td>country@iso3
> </td><td>TEXT</td><td>0</td><td></td><td>0</td></tr>
> <tr><td>5</td><td>country@numcode
> </td><td>INTEGER</td><td>0</td><td></td><td>0</td></tr>
> </table>
> </body>
> </html>
> As you can see country@printable has the type _name TEXT.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to