Great it works perfectly !
Is this cast a part of SQL Standard ?
Thanks
Nicolas
Satheesh Bandaram wrote:
I am not sure what SQL standard says about NULLs in this context, but
if you can CAST your untyped null to the type you are inserting to, it
works with Derby.
Satheesh
ij> create table tnull (i int, j int, k int);
0 rows inserted/updated/deleted
ij> insert into tnull values (1,2,3);
1 row inserted/updated/deleted
ij> insert into tnull select i, j, null from
tnull; <===== Raises error, like
you said
ERROR 42X01: Syntax error: Encountered "null" at line 1, column 32.
ij> insert into tnull select i, j, *cast(null as int)* from
tnull; <===== Works fine!
1 row inserted/updated/deleted
Nicolas Dufour wrote:
Hi
I have talked with users of other bases and it seems that the
statement select null from table is standard and should work.
So now why i doesn't work on Derby ? not yet implemented ?
Thanks
Nicolas
begin:vcard
fn:Nicolas Dufour
n:Dufour;Nicolas
org:NeoMetSys;Linux
adr:;;7 rue du theatre;Massy;;91300;France
email;internet:[EMAIL PROTECTED]
title:Consultant
tel;work:+1 973 379 3522
x-mozilla-html:FALSE
url:http://www.neometsys.fr/
version:2.1
end:vcard