ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » eSQL help

Post new topic  Reply to topic
 eSQL help « View previous topic :: View next topic » 
Author Message
madi
PostPosted: Fri Feb 03, 2006 7:28 am    Post subject: eSQL help Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Hi All

I have to convert the following things

Code:

Input:

<tag><Date>2006-02-25</Date><tag>

Output:

<tag><Date>2006-02-25 00:00:00 CST</Date></tag>



Code:

Input:

<tag>
<number1>123</number1>
<number2>45</number2>
<number3>6789</number3>
<tag>

Output:

<tag>
<number>123-45-6789</number>
</tag>




I dont need the code but I would appreciate it if you could point me to the manuals to look at how to do such stuff.

Thanks
madi
Back to top
View user's profile Send private message
rkford11
PostPosted: Fri Feb 03, 2006 7:45 am    Post subject: Re: eSQL help Reply with quote

Partisan

Joined: 06 Jun 2004
Posts: 316

You can start here

ftp://ftp.software.ibm.com/software/integration/wbibrokers/docs/V6.0/messagebroker_ESQL.pdf
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Feb 03, 2006 7:46 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's more than one way to do both of these. So there are different sections in the InfoCenter.

If you decide to model this, then you can look in the sections on the MRM.

If you decide to leave it as unmodelled XML, then you can look in the sections on ESQL and how to identify XML elements and attributes and etc. using ESQL.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
madi
PostPosted: Fri Feb 03, 2006 8:09 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

OK i was able to use CAST and convert the date into a time stamp but how do I add the timezome to it?

Also I am not able to find how to do the second transformation.

Is there something like

SET timezone = timestamp + 'CST' (append it to the timestamp)

Also in general is there append function to club two data fields into one?

thanks
madi
Back to top
View user's profile Send private message
JT
PostPosted: Fri Feb 03, 2006 8:19 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Have a look: http://www.mqseries.net/phpBB2/viewtopic.php?t=24716

Quote:
Also in general is there append function to club two data fields into one?

Code:
SET field1 = field2 || field3;
Back to top
View user's profile Send private message
madi
PostPosted: Fri Feb 03, 2006 8:27 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Thanks

Got what i needed.

--madi
Back to top
View user's profile Send private message
madi
PostPosted: Fri Feb 03, 2006 9:25 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Hi

When im using

CAST(mydate AS CHAR) it is giving me 'DATE 2006/02/03'

but I only need '2006/02/03' in the output

can i get rid of it in any way?

thanks
madi
Back to top
View user's profile Send private message
JT
PostPosted: Fri Feb 03, 2006 9:34 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Code:
SET mydate = SUBSTRING(mydate FROM 6);
Back to top
View user's profile Send private message
madi
PostPosted: Fri Feb 03, 2006 9:40 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

thanks again

--madi
Back to top
View user's profile Send private message
madi
PostPosted: Fri Feb 03, 2006 10:40 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Is there a function to add leading 0s after checking the number of digits in the number?

ex input: 12
Output: 0012

input: 123
output : 0123

thanks
madi
Back to top
View user's profile Send private message
madi
PostPosted: Fri Feb 03, 2006 10:43 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

NEVER MIND

GOT IT!!
Back to top
View user's profile Send private message
JT
PostPosted: Fri Feb 03, 2006 10:44 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Okay, now it's time for you to crack open the books.

Start here
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » eSQL help
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.