473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

DB2 - XML and Spatial data in same column - can't alter table once created - PLEASE HELP

I'm testing out db2 for a project I'm starting that requires proper xml
support and I can't seem to get both xml and spatial data to work well
in the same table.

Once having created a table containing both xml and spatial data fields
I can't seem to find a way to alter the table
I have created a table containing an id, xmldata field and a ST_Point
If I try to drop the xml field with ALTER TABLE TEST DROP COLUMN
XMLDATA I get an error message saying
alter table etest drop column xmldata
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL1242N An XML feature is not supported in the context where it is
used.
Reason code = "7". SQLSTATE=42997

(7 being:)
7 For tables containing columns of data type XML, a
REORG-recommended operation cannot be specified in an ALTER TABLE
statement.
If I try to drop the column through the alter table dialog box.. I get
an error due to the fact that I have spatial data

DBA7902 Do not attempt to alter a table containing non-supported column
data types.

I have the same problem trying to delete the spatial column...

If I use the alter talbe dialog.. I get the same error as ubove...
If I do a ALTER TABLE TEST DROP LOCATION (location being
a POINT) I get the first error message sayign that you can't do a alter
table drop... if there is xml data present in the table...
The ALTER TABLE command won't work if there is any xml data, and the
ALTER TALBE dialog box won't function if there is any spatial data.. so
in essence once I create the table, I can't change it.. although you
can properly insert data into it.
I split the table into two. and a made a view to unite the two.. but I
think this is a silly solution and there must be something I'm doing
wrong.. I don't want a separate table JUST for the location field.

I hope this is something trivial and that I just don't know db2 well
enough.

Sep 18 '06 #1
1 3466
You'll need to drop and recreate the table yourself.
Sorry
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Belinda | last post by:
Hi. I am just getting started with DB2's spatial extender and could really use some help. Pointers to good docs or examples are welcome. I am using DB2 version 8 on Sun. I have a database of...
13
by: Peter | last post by:
Can anyone tell me how to change the data type of a field in a table created with a make table query? The field is a binary and must be changed to text. alternately does anyone know how to specify...
6
by: David Gartrell | last post by:
Hi i'm trying to import an Excel Spreadsheet into Access2000 but the data types for two of the fields in my imported table are being identified incorrectly. Is there a way of using some VB code in...
1
by: lists | last post by:
When using the (tbl).field notation for selecting a specific field from a composite field then the query returning the field is executed once per field. An example is giving below. The runtime is...
2
by: EricaLRivera | last post by:
Hi Y'all I was hoping someone out there might be able to help me. I have an access program that needs to change the data types programatically. I have tried to do an alter column to change the...
4
by: Scott | last post by:
Ok. Brand new at this so please give a little patience and help me on the baby steps. I'm rewriting something I did initially in PHP / MySql on a vb.net / mysql platform. Here's what I'm doing:...
2
by: peter.prib | last post by:
Hi, I am having trouble getting DB2 to select an index I have created for a spatial location. Table definition create table gps_paf_address ( gnaf_address gnaf_address not null...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
1
by: RGow | last post by:
Hi, I'd like to know whether there is a way to alter the data type of a VARCHAR FOR BIT DATA column to be simply a VARCHAR column? I executed an ALTER TABLE statement, similar to, ALTER TABLE...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.