I am refactoring a table for an Adobe AIR application a little bit and am
calling the following statements:

CREATE TEMPORARY TABLE `tbl_backup` (
  `id`                   integer,
  `title`                varchar(255),
  `body`                text,
  `status`            varchar(16)
);

INSERT INTO `tbl_backup` SELECT * FROM `tbl`;

DROP TABLE `tbl`;

CREATE TABLE `tbl` (
  `id`      integer PRIMARY KEY AUTOINCREMENT NOT NULL,
  `title`                varchar(255),
  `body`                text,
  `isRead`              integer(1),
  `isExpired`              integer(1),
  `isReminder`          integer(1),
);

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`;

When I execute this, SQLite gives me a very useless error code: -1 with no
additional information. Does anyone have any insight as to what is causing
this error?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to