473,549 Members | 2,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3482
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
3125
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 genomic data and believe the spatial extender will help in querying. I have to do intersections, subtractions, proximity, etc of ranges in the...
13
2891
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 the field type when running a make table query? Thanks, Sven
6
6368
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 Access to change the data types for the fields from text to a number field or an Integer field. I'd be grateful for any advice you could give ...
1
1638
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 directly related to the number of fields accessed. The following tests is done with seqscan disabled - but I have confirmed the exact same...
2
1433
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 original data type from binary to text, but that did not work. The current section of code I have is the following: Public Function...
4
1347
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: 1) Data is pulled from the internet and stored to a CSV file 2) Data is loaded into the database with some changes 3) All sorts of data...
2
2524
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 ,GNF_PID varchar(015) not null
1
4837
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 wondering if anybody has experienced the same issues
1
3746
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 tab_name ALTER COLUMN col_name SET DATA TYPE VARCHAR(100) without any problems. However, a simple Java application reports via JDBC that the...
0
7551
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7991
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7838
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6084
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5396
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5118
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3524
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1971
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
790
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.