Joanne Pham <joannekpham-/[EMAIL PROTECTED]> wrote:
I have been working on MSSQL server and SQLite is new to me. I
usually did the following in MSQL server to check of the specific row
is existed in the table and have different action depending on the
result of the check. For example: Create table versionTable
(dbVersion varchar(20) insert into versionTable values('6, 0, 0, 1');
Now the table is created and it has one row(6, 0, 0, 1).
I usually do the following to check the content of the table
If NOT EXISTS ( select 1 from versionTable where dbVersion = '6, 0,
0, 1') insert into versionTable values('6, 0, 0, 2');
ELSE
update versionTable set dbVersion = '6, 0, 0, 2';
I really don't know how to convert these syntax from MSSQL server to
SQLite.
delete from versionTable;
insert into versionTable values ('6, 0, 0, 2');
Specifically for maintaining a version number in the database file, see
also
PRAGMA user_version
at http://sqlite.org/pragma.html
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------