"Rand Huck" <randh...@gmail.com> wrote in
message
news:d232e14b0903131800j53e59f56ic8e19b1d94bd7...@mail.gmail.com
> CREATE TABLE `tbl` (
>  `id`      integer PRIMARY KEY AUTOINCREMENT NOT NULL,
>  `title`                varchar(255),
>  `body`                text,
>  `isRead`              integer(1),
>  `isExpired`              integer(1),
>  `isReminder`          integer(1),
> );

Remove the last comma, one right before the closing paren.

> INSERT INTO `tbl` (`id`, `title`, `body`
> `isRead`, `isExpired`, `isReminder`) SELECT
> `id`,
> `title`,
> `body`,
> CASE WHEN `status` = 'viewed' THEN '1' ELSE '0' END AS `isRead`,
> CASE WHEN `status` = 'expired' THEN '1' ELSE '0' END AS `isExpired`,
> CASE WHEN `status` = 'reminder' THEN '1' ELSE '0' END AS `isReminder`,
> FROM `tbl_backup`;

Same here - remove the comma before FROM.

Igor Tandetnik 



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

Reply via email to