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

SQL Expression Used to Not Bring Back Data

Status
Not open for further replies.

Garyjr123

MIS
Sep 14, 2010
139
US
I have a report that brings back data (medications) that nurses would not like to show up if a certain field is inactive or error. I need a good SQL Expression to add to the Crystal Report so that every record that is inactive or error will not show up on my report.
 
Hi,
Why a SQL expression? Are you using a Command instead of the usual selection from tables in the report?

If you meant a formula to select only those records where a field does not contain the values 'inactive' or 'error' then use as a record selection formula something like:

NOT ({Table.Field} In ('inactive','error'))

Can you explain further - what fields are involved, what determines if inactive or error ( if those are not values in some field).



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top