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

Two conditions in SELECT Expert 2

Status
Not open for further replies.

epoh

IS-IT--Management
May 8, 2006
73
US
Hi all:

Is there a way to filter out records that meet two conditions?

SELECT EXPERT:

{Daily.UserName} <> "user" and
{Daily.Type} <> "Early"

I only want to filter out Username "user" and Type "Early" not
"user" and "Late" or
"joe" and "Early.

Thanks
 
Again Turkbear excellent suggestion!

Here is my functioning code:

Code:
{Daily.TimeGenerated} = currentdate-1 and
{@Filter} <> "59Late" and
{Daily.UserName} <> "user" and
{Daily.UserName} <> "user2"
 
In my earlier (brash!) statement, I meant that parens around simple "and" statements don't matter--they do, of course, matter in setting off if-thens that are connected by "ands" or when used with "not".

I'm not sure what epoh was looking for in terms of the late field in relation to type 59, but I'm betting that if only the "user" or "user2" that was "late" needed to be excluded, that part of the formula could have been written like:

not(
{table.user} in ["user","user2"] and
{table.type} = "late"
)

-LB
 
Good idea, LB, reverse the logic, hwoever I'm still curious why it might be rewriting the code...anybody have any ideas there?

-k
 
lbass, I will try your not() forumla.

late and 59 are hypothetical values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top