Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 19 JUN 2003 04:05:08PM Carl Champney wrote:

I'm new to this, but how do I reference a single occurrence of a multi-value field in a TCL LIST statement?

Thanks,

CC


At 19 JUN 2003 04:13PM Matt Sorrell wrote:

Carl,

If you select the table BY the MV field, it will "explode" the mv, normalizing the data on the fly.

For instance:

SELECT MY_TABLE BY MY_MV_FIELD WITH STATE=TX'

LIST MY_TABLE NAME CITY STATE ZIP MY_MV_FIELD

Let's say the select only grabs one record for the state of Texas, and MY_MV_FIELD contains 5 values. The list statement will print out 5 lines, with each of the single-valued fields being repeated to "flesh out" the data. Using the 'BY' keyword will also allow you to compare specific values in associated MV fields, e.g. effective and termination date history stacks.

Fair warning is given that this method can result in A LOT of records. I tend to nest multiple selects, with the earlier selects limiting based on single-valued fields and saving the BY MV_FIELD until the very end. This allows indexes to be used more efficiently and to keep a handle on the result set sizes.

msorrel@greyhound.com

Greyhound Lines, Inc.


At 19 JUN 2003 04:21PM Carl Champney wrote:

What I'm trying to do is to display only a specific one of the MV entries instead of all of them, to make it more manageable.

Thanks,

Carl


At 19 JUN 2003 04:34PM Revelation Technical Support wrote:

Carl:

LIST FILE WITH MV_FIELD=VALUE" LIMIT MV_FIELD=VALUE"

Use in list, not select.

Thanks


At 19 JUN 2003 04:45PM Carl Champney wrote:

That works if I know the value I want .. but it could be anything. From the list of all of the MV values, it looks like the one I want is always the first occurrence.

Thanks again,

Carl


At 19 JUN 2003 04:46PM Carl Champney wrote:

Matt,

Actually that worked well, except for all of the extra non-MV lines which printed anyway.

Thanks,

Carl


At 19 JUN 2003 05:37PM Richard Wilson wrote:

build a new sysbolic dictionary item with the following formula

@ANS=@RECORD

or

@ANS={existing dictionary item name}


At 20 JUN 2003 07:02AM Don Miller - C3 Inc. wrote:

I use an admitted kludge to solve this problem:

The reports that need to do this are launched from an R/BASIC front-end that sets @USER0 to contain the values I need to output on a given report.

Then a Dictionary Symbolic extracts the desired value(s) from the MV array and outputs them. No blank lines, etc. and no need to do an exploded MV sort or LIMIT statement that doesn't always solve the extraneous value(s) problem due to blank lines, etc.

Don M.


At 20 JUN 2003 09:42AM Carl Champney wrote:

Richard,

This looks like it is what I need to do, but I don't know how to use those things at TCL, i.e. LIST @ANS=@RECORD isn't acceptible. Is this R/BASIC code?

Ideally what I would like to do is to access these specific values in an export field name. In and Export ASCII record, is there some way to reference specific values?

Thanks,

Carl


At 20 JUN 2003 09:57AM Victor Engel wrote:

If you want to do that, put it in curly braces:

LIST filename {@ANS=@RECORD}


At 20 JUN 2003 10:26AM Richard Wilson wrote:

you will need to build a new dictionary item with one of the formulas I had in my earlier post.

building dict items varies with the release of Arev you are running.

try dropping to Tcl and hitting F10 that may bring up the revelation main menu and from there you can build the new dictionary item

Rich


At 20 JUN 2003 11:08AM Carl Champney wrote:

This appears to have worked GREAT for exporting. Thanks a ton, and what a responsive message board!

Carl

Antioch Company

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/7157457b4b034bb985256d4a006e55a1.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1