You stand a better chance of getting some help if you provide the DDL for
the L_LUNCHES and L_EMPLOYEES tables.

On 29 May 2016 at 18:19, Kent Sands <[email protected]> wrote:

> Anyone please help?
>
> I have all of my database tables created and have run into problems
> running INSERT statements that seem to be fairly straight forward, but
> there's something wrong with the format I'm using for the date values and I
> can't seem to find any resources that can provide me with an example of
> what the proper syntax is to use for table inserts. Any assistance would be
> greatly appreciated!
>
> There are two different sets of date inserts being performed. This first
> set seems fairly straight forward, but I'm missing something and don't know
> how to code this to make it work!
>
> INSERT INTO L_EMPLOYEES VALUES
>   (201, 'SUSAN', 'BROWN', 'EXE', '01-JUN-1998', 30, '3484', NULL);
> INSERT INTO L_EMPLOYEES VALUES
>   (202, 'JIM', 'KERN', 'SAL', '16-AUG-1999', 25, '8722', 201);
> INSERT INTO L_EMPLOYEES VALUES
>   (203, 'MARTHA', 'WOODS', 'SHP', '02-FEB-2009', 25, '7591', 201);
> INSERT INTO L_EMPLOYEES VALUES
>   (204, 'ELLEN', 'OWENS', 'SAL', '01-JUL-2008', 15, '6830', 202);
> INSERT INTO L_EMPLOYEES VALUES
>   (205, 'HENRY', 'PERKINS', 'SAL', '01-MAR-2006', 25, '5286', 202);
> INSERT INTO L_EMPLOYEES VALUES
>   (206, 'CAROL', 'ROSE', 'ACT', NULL, NULL, NULL, NULL);
> INSERT INTO L_EMPLOYEES VALUES
>   (207, 'DAN', 'SMITH', 'SHP', '01-DEC-2008', 25, '2259', 203);
> INSERT INTO L_EMPLOYEES VALUES
>   (208, 'FRED', 'CAMPBELL', 'SHP', '01-APR-2008', 25, '1752', 203);
> INSERT INTO L_EMPLOYEES VALUES
>   (209, 'PAULA', 'JACOBS', 'MKT', '17-MAR-1999', 15, '3357', 201);
> INSERT INTO L_EMPLOYEES VALUES
>   (210, 'NANCY', 'HOFFMAN', 'SAL', '16-FEB-2007', 25, '2974', 203);
> COMMIT;
>
> [image: Inline image]
>
>
> These statements are likewise producing errors. *H2 does not support the
> "TO_DATE" function!!* So that means we need to determine how to code the
> date function including the time for this section of the script.
>
> So fat today I have put about 9 hours of time working on this stupid
> script. This date/time issue has been really causing problems.
>
> INSERT INTO L_LUNCHES VALUES (1, '16-NOV-2011', 201, TO_DATE('13-OCT-2011
> 10:35:24', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (2, '16-NOV-2011', 207, TO_DATE('13-OCT-2011
> 10:35:39', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (3, '16-NOV-2011', 203, TO_DATE('13-OCT-2011
> 10:35:45', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (4, '16-NOV-2011', 204, TO_DATE('13-OCT-2011
> 10:35:58', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (6, '16-NOV-2011', 202, TO_DATE('13-OCT-2011
> 10:36:41', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (7, '16-NOV-2011', 210, TO_DATE('13-OCT-2011
> 10:38:52', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (8, '25-NOV-2011', 201, TO_DATE('14-OCT-2011
> 11:15:37', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (9, '25-NOV-2011', 208, TO_DATE('14-OCT-2011
> 14:23:36', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (12, '25-NOV-2011', 204, TO_DATE('14-OCT-2011
> 15:02:53', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (13, '25-NOV-2011', 207, TO_DATE('18-OCT-2011
> 08:42:11', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (15, '25-NOV-2011', 205, TO_DATE('21-OCT-2011
> 16:23:50', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (16, '05-DEC-2011', 201, TO_DATE('21-OCT-2011
> 16:23:59', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (17, '05-DEC-2011', 210, TO_DATE('21-OCT-2011
> 16:35:26', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (20, '05-DEC-2011', 205, TO_DATE('24-OCT-2011
> 09:55:27', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (21, '05-DEC-2011', 203, TO_DATE('24-OCT-2011
> 11:43:13', 'DD-MON-YYYY HH24:MI:SS'));
> INSERT INTO L_LUNCHES VALUES (22, '05-DEC-2011', 208, TO_DATE('24-OCT-2011
> 14:37:32', 'DD-MON-YYYY HH24:MI:SS'));
> COMMIT;
>
>
> [image: Inline image]
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to