Author |
Message
|
jagadeesharu708 |
Posted: Tue Jun 11, 2013 4:19 am Post subject: WMB Functions |
|
|
Newbie
Joined: 24 May 2013 Posts: 3
|
Hi all, I'm new to the WMB, can any one help me how to use the replicate function in esql for xml files. Thank you very much in advance. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jun 11, 2013 4:29 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The info center says: "REPLICATE is a string manipulation function that manipulates all data types (BIT, BLOB, and CHARACTER) and returns a string made up of multiple copies of a supplied string."
The REPLICATE function is not XML-specific and it does not operate on files. It operates on the logical message tree.
In other words, your question does not make a lot of sense. Maybe you can explain what you are trying to do, then we may be able to help. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 11, 2013 4:48 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Also, in Broker, there's no such thing as a file.
There are nodes that read and write files, but they are not files before written and they are not files after being read.
So it does not make sense to talk about XML files in Broker.
Everything is a message. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Jun 11, 2013 5:28 am Post subject: Re: WMB Functions |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
jagadeesharu708 wrote: |
Hi all, I'm new to the WMB, can any one help me how to use the replicate function in esql for xml files. Thank you very much in advance. |
REPLICATE function
REPLICATE is a string manipulation function that manipulates all data types (BIT, BLOB, and CHARACTER) and returns a string made up of multiple copies of a supplied string.
Syntax
Read syntax diagramSkip visual syntax diagram
>>-REPLICATE--(--PatternStringExpression--,--CountNumericExpression--)-><
REPLICATE returns a string consisting of the pattern string given by PatternStringExpression repeated the number of times given by CountNumericExpression.
The pattern string can be of the CHARACTER, BLOB, or BIT datatype and the count must be of type INTEGER. The result is of the same data type as the pattern string.
If the count is negative or zero, a zero length string is returned. If either parameter is NULL, the result is NULL.
The count is limited to 32*1024*1024 to protect the broker from erroneous programs. If this limit is exceeded, an exception condition is issued. |
|
Back to top |
|
 |
jagadeesharu708 |
Posted: Tue Jun 11, 2013 5:38 am Post subject: Re: WMB Functions |
|
|
Newbie
Joined: 24 May 2013 Posts: 3
|
Can any one please give me the syntax for the REPLICATE statement. |
|
Back to top |
|
 |
dogorsy |
Posted: Tue Jun 11, 2013 5:42 am Post subject: Re: WMB Functions |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
jagadeesharu708 wrote: |
Can any one please give me the syntax for the REPLICATE statement. |
Read the documentation. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2013 5:46 am Post subject: Re: WMB Functions |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jagadeesharu708 wrote: |
Can any one please give me the syntax for the REPLICATE statement. |
dogorsy wrote: |
>>-REPLICATE--(--PatternStringExpression--,--CountNumericExpression--)->< |
This of course is simply the InfoCenter section which you could (and arguably should) read directly. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jagadeesharu708 |
Posted: Tue Jun 11, 2013 5:47 am Post subject: Re: WMB Functions |
|
|
Newbie
Joined: 24 May 2013 Posts: 3
|
dogorsy wrote: |
jagadeesharu708 wrote: |
Can any one please give me the syntax for the REPLICATE statement. |
Read the documentation. |
Please give me one simple example. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 11, 2013 5:59 am Post subject: Re: WMB Functions |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jagadeesharu708 wrote: |
dogorsy wrote: |
jagadeesharu708 wrote: |
Can any one please give me the syntax for the REPLICATE statement. |
Read the documentation. |
Please give me one simple example. |
Why not try to create a simple example? It's a function with 2 parameters; work it out. If you have tried it, and are having trouble, why not post what you've done and what happens rather than jonesing for a working example you can try and compare to yours?
You could have finished an entire ESQL module in the time it's taken you you to post here and ask us to think for you. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 11, 2013 6:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
We can't give you a simple example because you have not explained what you are trying to do.
Please explain what you are trying to do. |
|
Back to top |
|
 |
reddy2078 |
Posted: Wed Jun 12, 2013 6:23 am Post subject: |
|
|
Newbie
Joined: 21 Apr 2013 Posts: 7
|
Code: |
DECLARE NM CHARACTER ;
SET NM = REPLICATE('*',6); |
This is nothing but we are assigning 6 – Stars to Variable NM
NM = * * * * * * |
|
Back to top |
|
 |
|