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

Converting/Trimming XML VARCHAR Tag to Date

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, 237 views)
Jun 7 '12 #1
1 2196
Luuk
1,047 Expert 1GB
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

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

Similar topics

2
by: Anthony | last post by:
I have an inventory database that Im trying to create a report out of the IP address are a lookup on a seperat table but I keep getting the above error can I change the table row to something to...
3
by: pw | last post by:
Hello, How can I typecast a date generated from VARCHAR fields into a date field ie: UPDATE inventory SET date_field = vc_year||'-'||vc_month||'-'||vc_day;
1
by: ree32 | last post by:
I am having problems with Date Strings when using VS.net method of converting an XML document to a dataset. I need the the date nodes to be of date type. As I am loading the Dataset to a...
2
by: - Steve - | last post by:
I'm taking the value of the expire date out of an AD account (accountExpires attribute) and passing it into this function. static DateTime LargeIntToDateTime(ActiveDs.LargeInteger li) { long...
1
by: ronca | last post by:
Error Syntax error converting the varchar value $568.25 to a column of data type Statement I'm using Select Top 1000 * From mass.dbo.dbo_MASS where _amount > 5000 Want only row with _amount...
5
by: Patti | last post by:
I am struggling with converting a certain varchar column into an int. I have a table that has 2 fields - one field holds the loan number and the other field holds the codes associated with that...
2
by: sbcaco | last post by:
Hello again... can someone tell me how to work around this error: String or binary data would be truncated. I am doing this: update table1 set =
9
by: gggram2000 | last post by:
I need some help, cant figure out the error. SqlConnection dbConnection = new SqlConnection(xmldb); dbConnection.Open(); string sql = "SELECT InvStatus FROM SaleReceipts Where AccNum = '" +...
5
by: Joell | last post by:
When I try to insert values into an existing table, I am getting the following error. The table is not in bit data type format and neither is the target table. Conversion failed when converting the...
1
by: vertigo262 | last post by:
This is driving me crazy I run this query in the sql management studio and it works fine. but seems like it doesn't work in the stored procedure Can I not use a LIKE '%' in an integer field? ...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
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...

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.