By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,529 Members | 864 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,529 IT Pros & Developers. It's quick & easy.

Converting/Trimming XML VARCHAR Tag to Date

P: 42
I am attempting to trim/convert XML VARCHAR Tag to date, but have not been successfull. Below is my XML SQL:

Expand|Select|Wrap|Line Numbers
  1. select X.*, A.CASE_NUMBER,
  2. FROM DB2PROD.ARTS_OGC_CASE_ACTION_DETAIL A,
  3. XMLTABLE ('$d/artsProbationBean' passing Case_Action_XML as "d"
  4. columns
  5.  CASE_NUMBER integer path 'CASE_NUMBER',
  6.  indicatorCode varchar(20) path 'indicatorCode',
  7.  extendNumberOfMonths varchar(40) path 'extendNumberOfMonths',
  8.   probationType varchar(10) path 'probationType',
  9.   endDate varchar(40) path 'endDate',
  10.   numberOfMonths integer  path 'numberOfMonths',
  11.   startDate varchar(40) path 'startDate') as X
Attached Files
File Type: doc XMl Help.doc (64.5 KB, 164 views)
Jun 7 '12 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,035
Its a DB2 question, posted in the 'MySQL questions' area ;)


change line 1 to:
Expand|Select|Wrap|Line Numbers
  1. select ....., Trim(X.startdate),... A.CASE_NUMBER, 
Jun 9 '12 #2

Post your reply

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