Igor Tandetnik wrote:
> "Joanne Pham" <[EMAIL PROTECTED]>
>> attach database
>> 'CommonDB' as CDB; select remoteId, bytesIn from compressTable where
>> remoteId in (select remoteId from CDB.remoteWXTable where
>> remoteType=1); detach database CDB;
>
> That's three statements, not one. You need to prepare and execute each
> one separately.
>
You can use sqlite3_exec() to do the prepare and execute for the first
and last statements.
sqlite3_exec(db, "attach database 'CommonDB' as CDB");
/*
prepare and execute query
select remoteId, bytesIn
from compressTable
where remoteId in
(select remoteId from CDB.remoteWXTable where remoteType=1)
*/
sqlite3_exec(db, "detach database CDB");
HTH
Dennis Cote
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users