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!

Problems with a reporting condition 1

Status
Not open for further replies.

funkmonsteruk

IS-IT--Management
Feb 8, 2002
210
GB
I'm running a report from a universe which contains fields relating to <name>, <Operator>, <Operators manager> and <Letter Code>. I want to display all the <names> which don't have a <letter code> d04 or c90. The problem i have is when i run the report using <letter Code> differewnt from 'd04' and <letter Code> different from 'c90', i'm getting names which have letter codes d04 and c90.

I think that the problem is theat the report is looking at all the letter codes which are attached to a name and if there are other codes apart from d04 or c90 it is including the name in the list.

Does anybody know how i can get BO to rport only the names which don't have the conditional letter codes?
 
Hello Funk,

This is easily achieved by using the subquery structure BO offers :

Select ...,....,....,
From Table
Where
<name> NOT IN
(select <name> from Table
where <lettercode> = 'd04' or <lettercode> = 'c90')


You can very easily get this result by taking Name in the condition of the main query , then selecting operator 'Not in List' and then create the subquery 1.1

This gives you an uncorrelated subquery, with the chance of slow performance. A correlated subquery can be build with operator 'calculation' instead of 'create a subquery' T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top