Bennie47250
Programmer
Using Crystal 7.0 on an MS SQL database
Our sales are broken into Regions and Territories. Need to design a report that excludes sales to our export regions and territories.
In some regions, all the territories are excluded but in one region, only need to exclude a few territories. There is a range of regions that need to be excluded.
With all the different conditions, not sure how to combine them together for one select statement.
Each individual condition is shown below. How would these be combined into one select statement?
To exclude regions and all the territories in the region
not ({Sales_Table.Sales Region } in [76, 48, 47, 46, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 15, 8])
To exclude a range or regions
not ({Sales_Table.Sales Region} in 800 to 899)
To exclude specific territories in a region
{ Sales_Table.Sales Region} <> 60.00 and
not ({Sales_Table.Sales Area} in [616.00, 680.00, 698.00])
Thanks
Bennie
Our sales are broken into Regions and Territories. Need to design a report that excludes sales to our export regions and territories.
In some regions, all the territories are excluded but in one region, only need to exclude a few territories. There is a range of regions that need to be excluded.
With all the different conditions, not sure how to combine them together for one select statement.
Each individual condition is shown below. How would these be combined into one select statement?
To exclude regions and all the territories in the region
not ({Sales_Table.Sales Region } in [76, 48, 47, 46, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 15, 8])
To exclude a range or regions
not ({Sales_Table.Sales Region} in 800 to 899)
To exclude specific territories in a region
{ Sales_Table.Sales Region} <> 60.00 and
not ({Sales_Table.Sales Area} in [616.00, 680.00, 698.00])
Thanks
Bennie