AidanLee has asked for the wisdom of the Perl Monks concerning the following question:
I'm struggling a bit with a query I would expect to work, but errors both running it through my script and from the sqlplus prompt. I was hoping that anyone who had some Oracle experience could point out what it is I'm doing wrong:
Given this table schema for the table 'Promotions':Name Null? Type ------------------------------- -------- ---- ID NOT NULL NUMBER(5) DATE_CREATED NOT NULL DATE DATE_MODIFIED NOT NULL DATE TITLE NOT NULL VARCHAR2(64) PROMOTION_PHRASE NOT NULL VARCHAR2(255) DATE_START DATE DATE_END DATE STATUS NOT NULL NUMBER(2) TRIGGER_TYPE NOT NULL NUMBER(2) TRIGGER_VALUE NOT NULL VARCHAR2(12) TRIGGER_QUANTITY NOT NULL VARCHAR2(12) REWARD_TYPE NOT NULL NUMBER(2) REWARD_VALUE NOT NULL VARCHAR2(12) REWARD_QUANTITY NOT NULL VARCHAR2(12) USES_PERCUSTOMER NOT NULL NUMBER(5) USES_MAXIMUM NOT NULL NUMBER(10)
And my query:
insert into Promotions (ID,Date_Created,Date_Modified,Title, Promotion_Phrase,Date_Start,Date_End,Status, Trigger_Type,Trigger_Value,Trigger_Quantity, Reward_Type,Reward_Value,Reward_Quantity, Uses_PerCustomer,Uses_Maximum) values (1,SYSDATE,SYSDATE,'test promotion', 'phrase here',NULL,NULL,0,0,'','',0,'','',1,0);
in my perl code I'm using placeholders for all the values, and undef's for the two null values I do want
. The error I'm getting is this: ORA-01400: mandatory (NOT NULL) column is missing or NULL during insertOf course, Oracle doesn't take the courtesy to tell me *which* column it is referring to. Any insights would be much appreciated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Oracle and empty strings...
by Rhose (Priest) on Sep 14, 2001 at 01:11 UTC | |
|
Re: OT: Oracle SQL issues
by seesik (Initiate) on Sep 13, 2001 at 18:05 UTC | |
by runrig (Abbot) on Sep 13, 2001 at 19:52 UTC | |
by seesik (Initiate) on Sep 13, 2001 at 20:14 UTC | |
by AidanLee (Chaplain) on Sep 13, 2001 at 18:10 UTC | |
by seesik (Initiate) on Sep 13, 2001 at 18:19 UTC | |
by AidanLee (Chaplain) on Sep 13, 2001 at 18:51 UTC | |
by seesik (Initiate) on Sep 13, 2001 at 20:11 UTC | |
| |
by AidanLee (Chaplain) on Sep 13, 2001 at 18:31 UTC | |
|
Re: OT: Oracle SQL issues
by runrig (Abbot) on Sep 13, 2001 at 19:58 UTC |