473,725 Members | 2,169 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 3512
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
3152
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 chromosomes. The database and even some tables include data on all chromosomes of several species. I am...
13
2914
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
6388
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 Many thanks David
1
1657
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 behavior with seqscan enabled. Another side effect of this is the case where f_all_acl() actually...
2
1446
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 ChangeColumnType(ByVal StrgTableName As String, _ strgColumnName As String, StrgNewDataType) As Boolean
4
1353
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 crunching goes on. Step one works fine -- data is saved to a csv file. Step 2 -- The data is loaded...
2
2545
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
4855
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
3766
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 column type is still VARCHAR FOR BIT DATA.
0
8752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4519
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
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
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.