ABS Tech Note: DAL30 Error Inserting Date With Select

This tech note describes a problem with DAL and the Oracle DBMS relating to inserting dates.
If you try to insert into a table using values from another table with an INSERT INTO <table> SELECT phrase, and if there's a date involved the insert will fail with an Oracle error. You can insert the same date value if you use an INSERT INTO <table> VALUES phrase. The following code shows an example:

set $datefmt="DDMMM YY";
set $timefmt="HHMM";
insert into table_name values ("234234", "@#$@", "12Feb 92 0901");
insert into location values ("AAAAAA", "BBBB");

insert into table_name select location.station, "BBBB", "12Feb 92 0901"
from location where location.building = "BBBB";

****Remote DAL Error****
*Primary Error: untranslated DBMS error (-10207)
*Secondary Error: (-1830)

This is not a DAL error, but an Oracle error, and the same error can be reproduced under SQL*Plus. You can work around this error by removing the time field and only inserting the date.
Published Date: Feb 19, 2012