Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Use zero, which means "generate the next number" in a serial column:
LET lr_ope.ope_cod = 0
...
Regards,
Doug Lawry
"eferreyra" <eferreyra@gmail.com> wrote in message
news:824385bf-96bd-4006-b8ee-f4a3f9f7678c@x9g2000yqk.googlegroups.com...
> Hi people, i have a "large" table with a SERIAL as pk. In I4GL i have
> a record variable like this table, then i try to use insert statement
> with the record.* but always fail because the pk (serial) is null, how
> can i fix this ?
>
> DEFINE lr_ope RECORD LIKE operaciones.*
> --
>
> LET lr_ope.ope_cod = NULL -- SERIAL FIELD (PK)
> --
>
> INSERT INTO operaciones VALUES (lr_ope.*)
> -- Cannot insert a null into column (operaciones.ope_cod)>
> Thanks !!
>
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.