Subject Re: SELECT INTO TABLE
Author Milan Babuskov
--- In firebird-support@yahoogroups.com, Vlad Orlovsky wrote:
> insert into USERS2(USER_ID, USER_ROLE_ID,USER_NAME)
> select USER_ID, USER_ROLE_ID,USER_NAME from USER;
>
> I'm getting:
>
> Dynamic SQL Error.
> SQL error code = -104.
> Token unknown - line 2, column 45.
> USER.

USER is a reserved keyword, so you need to quote it:

insert into USERS2(USER_ID, USER_ROLE_ID,USER_NAME)
select USER_ID, USER_ROLE_ID,USER_NAME from "USER";

--
Milan Babuskov
http://www.guacosoft.com
http://www.flamerobin.org