Displaying ID for each multivalue

  • ashish
  • Topic Author
  • Offline
  • New Member
  • New Member
More
15 years 7 months ago #3970 by ashish
Displaying ID for each multivalue was created by ashish
Hi
How to display ID for each mutivalue field.

>LIST FBNK.DATA V1 V2

ID V1 V2
..................................
83384 MY 3228
______KR 3220
______TH 4669
85250 TH 4669
______KR 1302
______MY 1127
______TW 1648

( Please ignore underline "_______" added to make columns align)

Here i want to display ID for each subvalue in output so that i can export it to excel and filter on basis V1="MY".

Or is there any way to select only those records which have "MY" in field V1 and correspoding V2 value. As noted above position of "MY" in V1 is not same and number of subvalues in V1,V2 is varying.

Thanks,
Ashish

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #8536 by oscarramol
Replied by oscarramol on topic Re: Displaying ID for each multivalue
Extracted from: "UniVerse Guide to RetrieVe"


Sorting Data with Multivalues

When you sort records on a multivalued field, you need to explode the values.
Although you could sort a multivalued field without exploding its values, the
output is usually not meaningful.
For example, assume that you want to list all scheduled vaccinations for the livestock,
in order by date, so that you can mark them on your calendar. Scheduled
dates are stored in the multivalued field VAC.NEXT, and the type of vaccination is
stored in an associated multivalued field called VAC.TYPE. Sorting on VAC.NEXT
without exploding it produces a list of records sorted by the first date found in
VAC.NEXT in each record, rather than by all dates, as shown:

>LIST LIVESTOCK.F DESCRIPTION VAC.NEXT VAC.TYPE ID.SUP
BY VAC.NEXT
LIST LIVESTOCK.F DESCRIPTION VAC.NEXT VAC.TYPE ID.SUP BY
VAC.NEXT 11:37:05AM 31 May 1995 PAGE 1
DESCRIPTION VAC.NEXT.. VAC.TYPE
Shetland 06/03/95 R
09/21/96 P
04/07/96 L
Horse 06/05/95 R
08/27/96 P
08/03/96 L
Horse 06/08/95 R
01/21/95 P
02/07/96 L
Linsang 06/12/95 R
03/27/95 P
03/30/95 L
Ferret 06/16/95 R

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago - 13 years 10 months ago #8537 by oscarramol
Replied by oscarramol on topic Re: Displaying ID for each multivalue
post you email so i can send you the manual.
Last edit: 13 years 10 months ago by oscarramol.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #9962 by htaox
Replied by htaox on topic Re: Displaying ID for each multivalue
Very easy with this tool:

eztier.com/web/?p=118

Read the section: "Selectively Exploding Fields"

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
13 years 5 months ago #9966 by jpb
Replied by jpb on topic Re: Displaying ID for each multivalue
No need to buy a tool when you know how to use jQL.

e.g. :

LIST FBNK.SEC.TRADE CUSTOMER.NO EVAL"CUSTOMER.NO;SUBR('ENQ.TRANS','CUSTOMER',@1,23)" AS CUS.CATEG FMT"6R" EVAL"CUSTOMER.NO;SUBR('ENQ.TRANS','CUSTOMER',@1,23);SUBR('ENQ.TRANS','CATEGORY',@2,2)" AS CAT.SHORT FMT"25L" WITH @ID LIKE SCTRSC11... AND WHEN CUSTOMER.NO LIKE 6... BY-EXP CUSTOMER.NO

;-)

Please Log in or Create an account to join the conversation.

Time to create page: 0.032 seconds