On Sep 11, 2009, at 4:32 PM, rishabh wrote:

>
> i have a stream of data coming in with constant table names and data.
> one of the table names contains a '-' (minus sign). it gives error  
> while
> creating the table.
>
> SQL error: near "-": syntax error
> something like Create table "t-t" ( a ); works but Create table t-t  
> ( a );
> gives the above error.
> similarly insert into "t-t" values (1); works, but dont know why using
> mprintf it has a problem. :(
> if i use double quotes around the table name, the table gets  
> created, but
> then insert on that table does not work. i am using C/C++ to do the
> inserting, creating, updating etc.
> if in mprintf ... i use \"%Q\" ... for the insert statement, it does  
> not it
> gives error saying that the table does not exist whereas the table  
> has been
> created.

You should inspect the string returned by sqlite3_mprintf(), either by
printing it out, or looking at it in a debugger. I think you could be
misinterpreting the docs for %Q.

Dan.


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

Reply via email to