You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by John English <je...@brighton.ac.uk> on 2010/01/29 18:56:13 UTC

Problem upgrading to 10.5.3: column named XML

I am trying to upgrade an old app (v8 or 9) to 10.5.3 but have run up
against a serious problem. The DB contains several tables with columns
called XML, which is now a reserved word in v10.x. These cause SQL
exceptions when the app tries to access them.

The older version of Derby that the app currently uses doesn't support
column renaming, so I can't change the existing tables in situ, and as
it's a live system I can't afford to just recreate the tables.

I've tried surrounding the name XML in double quotes ("XML") but that
doesn't work.

Is there perhaps a version of Derby that I can download that supports
column renaming but doesn't have XML as a reserved word? Or is there
another solution that I've missed?

TIA,

----------------------------------------------------------------------
  John English              | mailto:je@brighton.ac.uk
  Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
  School of Computing & MIS | "Those who don't know their history
  University of Brighton    |  are condemned to relive it" (Santayana)
----------------------------------------------------------------------

Re: Problem upgrading to 10.5.3: column named XML

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I've tried surrounding the name XML in double quotes ("XML") but that
> doesn't work.

It should work. I've used quoting in Derby in similar circumstances quite
successfully. Can you post more details about the exact statement
you issued and the exact error you received?

Note that if you enclose the table or column name in double quotes
you have to get the upper/lower case of the name EXACTLY RIGHT. If
you don't use quotes, table and column names are case-insensitive,
so it is easy to be somewhat inconsistent with upper and lower case,
but when you use quotation marks, you must get it exactly right.

thanks,

bryan