473,386 Members | 1,652 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,386 software developers and data experts.

Trim Timestamp XML Tags in DB2 column - Using SQL to query

42
I have a project were programmers decided to use XML to code additional fields in order to decrease the number of DB2 Tables. This is caused me to have to learn how to query the XML column that hold the data. I am attempting to pull information for a Case Action that exist in the DB2 Table. The table name is ARTS_OGC_CASE_ACTION_DETAIL. The columns are case_number, case_action_detail_code, case_action_xml

I want to be able to Trim the date fields.

Expand|Select|Wrap|Line Numbers
  1.  select  A.case_number,B.Open_Date, B.AGENT_ID, X.*,
  2. DATE(X.startDate) as T
  3. --Date(timestamp_startDate,101) as T
  4. FROM DB2PROD.ARTS_OGC_CASE_ACTION_DETAIL A,
  5. XMLTABLE ('$d/artsQualityOfBusinessReviewBean' passing Case_Action_XML as "d"
  6. columns
  7.  indicatorCode varchar(20) path 'indicatorCode',
  8.  startDate timestamp   path 'startDate',
  9.  dueDate timestamp  path 'dueDate',
  10.  endDate timestamp  path 'endDate',
  11.  frequency varchar (40) path 'frequency',
  12.  completedDate timestamp path 'completedDate') as X,
  13.  DB2PROD.ARTS_CASE_RESEARCH B
  14. WHERE A.CASE_NUMBER = B.CASE_NUMBER 
Jul 8 '11 #1
1 2722
NeoPa
32,556 Expert Mod 16PB
There appears to be no help available from the XML side, as I'm told it's DB2 specific, so let's see if you get more luck here in the DB2 forum.
Jul 11 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: anshul | last post by:
Can somebody tell me about state management in asp.net using Query Strings. I am just unable to understand this. Anshul
2
by: Mattyw | last post by:
Hi I have a sqlcommand that returns all the rows in a column and then pass that to a datareader. I am new to VS.Net and so far I can only return the first row in the first column using ...
18
by: A.M | last post by:
Hi, Is there any way to call a WSS web service method by using browser and see the XML result in browser as well? I have been told that there is query string syntax for calling...
0
by: hemant123 | last post by:
Hi I Am Trying To Insert Null Value In Oracle Date Column Using Visual Basic 6 Textbox. I Tried Various Options But Unable To Insert. Please Advise Me A Solution. Thanks In Advance Hemant
2
by: dollyvishal | last post by:
How to get constraint information for MS Access tables using Query?
1
by: rasirish | last post by:
giving link to each and every row in datagrid column using hyperlink
0
by: =?Utf-8?B?VG9ueSBBLg==?= | last post by:
I'm trying to develop a parameter query using Query Builder, the database is Access 2003. I placed a ? in the column to we quered and linked it to a checkbox on the form. When the user selects an...
3
manoj9849967222
by: manoj9849967222 | last post by:
HI All I have two tables One is "master" & the other one is "child". The master Table have filds Productcode -----Number Productname-------Text Child Table
1
by: viper888 | last post by:
Hi there, How can I automate may database backup using query analyser? My routine goes this way: 1. Every 5:00pm check Enterprise manager who is currenlty logged on to sql server. 2. If there...
5
by: =?Utf-8?B?TWlrZSBPS0M=?= | last post by:
How do I get the width of a column using Type Datasets? I don't want to know the length of the data in the column, I want to know the width of the column. In my code, if the column width is 50...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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.