db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff hendrey <geoff_hend...@yahoo.com>
Subject ALTER COLUMN ..NOT NULL double quotes bug?
Date Sun, 27 Jan 2008 21:05:00 GMT
Hi:
I think I have isolated a bug involving the use of double quotes to define a column name.
Here s the SQL to reproduce the bug, followed by the error message generated by the final
SQL statement. In order to make the bug go away, eliminate all use of double quotes in the
SQL statements below. Note that the identical alter statement succeeds before the insert,
and fail after. I have spent a long time trying to isolate this problem, so please take a
look. 

CREATE TABLE Table2
(
   "c" VARCHAR(32672)
);

alter table Table2 ALTER COLUMN "c" NULL;
alter table Table2 ALTER COLUMN "c" NOT NULL;
INSERT INTO Table2("c") VALUES('yo');
alter table Table2 ALTER COLUMN "c" NULL;
alter table Table2 ALTER COLUMN "c" NOT NULL;


Query 1 of 6 elapsed time (seconds) - Total: 0.012, SQL query: 0.012, Building output: 0

Query 2 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0

Query 3 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0
1 Row(s) Inserted
Query 4 of 6 elapsed time (seconds) - Total: 0.009, SQL query: 0.009, Building output: 0

Query 5 of 6 elapsed time (seconds) - Total: 0.003, SQL query: 0.003, Building output: 0
Error: java.sql.SQLException: Column 'C' is either not in any table in the FROM list or appears
within a join specification and is outside the scope of the join specification or appears
in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement
then 'C' is not a column in the target table., SQL State: 42X04, Error Code: -1

Mime
View raw message