I just installed oracle-xe (10g) with application express on a linux dev server running centos 5.x. Enabled archivelog mode and created a new user/schema to create my tables and application under. I created a table in application express and get a PLS-00049: bad bind variable 'NEW.USER_IDX' error. I don't see what's wrong with the sql or pl/sql. The code is below. Any help is appreciated. I'm scratching my head on this seemingly simple problem.
CREATE table "users" (
"user_idx" NVARCHAR2(255) NOT NULL,
"user_email" VARCHAR2(255) NOT NULL,
"user_pw" VARCHAR2(255) NOT NULL,
constraint "users_PK" primary key ("user_idx")
)
/
CREATE sequence "USERS_SEQ"
/
CREATE trigger "BI_users"
before insert on "users"
for each row
begin
select "USERS_SEQ".nextval into :NEW.user_idx from dual;
end;
/
alter table "users" add
constraint USERS_UK1
unique ("user_idx","user_email")
/
Thanks!
CREATE table "users" (
"user_idx" NVARCHAR2(255) NOT NULL,
"user_email" VARCHAR2(255) NOT NULL,
"user_pw" VARCHAR2(255) NOT NULL,
constraint "users_PK" primary key ("user_idx")
)
/
CREATE sequence "USERS_SEQ"
/
CREATE trigger "BI_users"
before insert on "users"
for each row
begin
select "USERS_SEQ".nextval into :NEW.user_idx from dual;
end;
/
alter table "users" add
constraint USERS_UK1
unique ("user_idx","user_email")
/
Thanks!