|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
ESQL Select DISTINCT |
« View previous topic :: View next topic » |
Author |
Message
|
bruce2359 |
Posted: Wed Jan 22, 2020 6:57 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Wait patiently. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
arunkumo |
Posted: Mon Jan 27, 2020 2:04 pm Post subject: Re: Solution for getting Distinct |
|
|
 Novice
Joined: 21 Sep 2014 Posts: 20
|
Aldrine wrote: |
Hi,
Code: |
DECLARE tempGroup ROW;
DECLARE index INTEGER 1;
set tempGroup.Field[1] = InputRoot.XMLNS.Body.Field[1];
FOR loopField As InputRoot.XMLNS.Body.Field[*]
IF NOT EXISTS SELECT Field FROM temprow.Field[] WHERE tempGroup.Field = loopField
set tempGroup.field[index++] = loopField
END IF
END FOR |
This way we can get only the unique values. |
Hi aldine,
can you help me with working code, I have tried this but it is throwing some errors.
Description Resource Path Location Type
Syntax error. Valid options include: ] = > < - ( + .NET CASE CAST COUNT CURRENT_DATE CURRENT_GMTDATE CURRENT_GMTTIME CURRENT_GMTTIMESTAMP CURRENT_TIME CURRENT_TIMESTAMP DATE DECIMAL EVAL EXISTS EXTRACT FALSE FOR GMTTIME GMTTIMESTAMP IDENTIFIER INTERVAL LAST LIST LOCAL_TIMEZONE LOG MAX MIN NOT NULL OVERLAY PARSE PASSTHRU POSITION RAND ROUND ROW SELECT SIMPLE_FUNCTION SUBSTRING SUM THE TIME TIMESTAMP TRIM TRUE UNKNOWN URLENCODE UUIDASBLOB UUIDASCHAR CorrespondenceNotification_ProcessFile.esql /CorrespondenceNotification line 24 ESQL Parser |
|
Back to top |
|
 |
timber |
Posted: Mon Jan 27, 2020 4:16 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
This code is inefficient and probably not what you need (even if the person you are trying to address still exists on this forum after 9 years).
Please stop posting on this thread, and spend your time on the other thread explaining your problem properly. |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|