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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with formula

Status
Not open for further replies.

mathu17

Technical User
Feb 2, 2012
7
CA
following is the data that i have in my database

MERCID TERMID RNGMIN RNGMAX SENUM
------ ----- ------ ------ ------
M123 T123 378683 378683 9360125117
M123 T123 601100 601100 1905602361

the formula that i'm using:

If (({RNGMIN} >= '340000') and ({RNGMAX} <= '340000')) or (({RNGMIN} >= '370000') or ({RNGMAX} <= '379999')) Then
{SENUM}
Else
''

the issue is that it returns both SENUM values. but i'm expecting it to return only SENUM = 9360125117
I'm grouping by a @Key (@key:= (TERMID+RNGMIN+RNGMAX)
if i group by TERMID then it returns SENUM = 1905602361


working with crystal 8.5 and DB2.

Hope i've illustrated my issue.
Can anyone please help me with this.

thanks.
 
Please disregards this post. i just realized that my formula is wrong.

sorry for the inconvenience.
 
I'm guessing you meant:

or (({RNGMIN} >= '370000') [red]and[/red]
({RNGMAX} <= '379999'))

...just to clarify for other readers.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top