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

How to identify a business without a particular line 1

Status
Not open for further replies.

ynott

Technical User
Sep 26, 2000
49
US
I'll simplify to the following:

table1.BusinessName
table1.ID

tableA.RefID
tableA.comment

tableA has a many to one relation. table1.ID <-> tableA.RefId

Now the question.

#1 - I would like to identify every table1.BusinessName that doesn't have at least one tableA.comment that DOES NOT have *last update* in it.

How can this be done?
 
Do you really mean:

identify every table1.BusinessName that HAS at least one tableA.comment that DOES NOT have *last update* in it

???

If so, make sure you have a left join from table1 to tableA and then create a formula {@haslastupdt}:

if isnull({table.comment}) or
{tableA.comment} like "*last update*" then 1 else 0

Insert a group on {table1.BusinessName} and then go to report->selection formula->GROUP and enter:

sum({@haslastupdt},{table1.BusinessName}) = 0

This will select a BusinessName when there is at least one comment that does not contain "*last update*", but will ignore those with no comments or those containing that phrase.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top