SP2-0552: Unstated Bind variable "19"

Asked

Viewed 674 times

3

I am using Oracle SQL Developer to finish a project, when I was popular the database, the software accused an error in the following line:

INSERT INTO musica (cod_musica, data_composicao, titulo, duracao)
VALUES (11111, '1993/01/01', 'Fênis', '22/12/2016 00:15:19 123');

data_composicao is as DATE and duracao is as TIMESTAMP, even when I take the '' I can’t make it work, I thank you for your attention.

1 answer

1

I believe that the fraction of seconds that you are using separately, is wrong, being the correct separate with point;

The mask for the fraction of seconds is defined by the FF;

The value saved in the field duracao, is day/month/year, so the mask should follow this shape (dd/mm/yyyy);

In this way, your insert will stay like this:

INSERT INTO musica (cod_musica, data_composicao, titulo, duracao)
VALUES (11111, TO_DATE('1993/01/01', 'yyyy/mm/dd'), 'Fênis', TO_TIMESTAMP('22/12/2016 00:15:19.123', 'dd/mm/yyyy HH24:MI:SS.FF3'));

In this post, has a beautiful answer about the TIMESTAMP.

Oracle documentation

Browser other questions tagged

You are not signed in. Login or sign up in order to post.