Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

one to many, how to select specific record?

Status
Not open for further replies.

jackyzsn

Programmer
May 17, 2007
14
CA
Another Q. I need to joint two table together. It's one to multiple situation. I need to select one record based on some criteria, say for example, based on an effective day would be one to one, how could I do that?

Another one, I need to accept PARM from client input, I need to format the client input for example change the input to upper case so I can use it for selection criteria?
 
A one-to-many JOIN is done with the 'ALL' or 'MULTIPLE keyword:

Code:
JOIN from_field IN host TO [b]ALL[/b] to_field IN target AS join_name

As for the parameter, there's a routine called UPCASE:

Code:
UPCASE(length,input,outfield/format)

Since you'll be doing it in Dialogue Manager, you have to be creative (if you don't have a fixed length variable), and do it something like this (assuming your variable is called &A):

Code:
-SET &UA = UPCASE(&A.LENGTH,&A,'A100');
-SET &UA = TRUNCATE(&UA);

The first set gives you a 100 character output (assume that's the maximum length. the second set drops trailing blanks.
 
Works great!!

Where can I find a list of function I can use in webfocus, like the TRUNCATE? I'm using webfocus 7.1.
 
You should have access to online documentation with your WF install.
Click on HELP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top