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

Phone Selection Formula problem

Status
Not open for further replies.

grecon

Technical User
Mar 8, 2007
78
US
Need help with this selection formula:

{PHONES.CUST_NUM} = {?Pm-CUST.ID} and
{PHONES.PHONE_TYPE} in ["", "O"]

My problem is that it is not including the phone numbers that don't have a type. I need it to select the OFFICE phone number which is "O" and if it has no type listed I need it to select that. Thanks
 
There is a world of difference between "" and NULL, you will probably find data is NULL. Try

{PHONES.CUST_NUM} = {?Pm-CUST.ID} and
(isnull({PHONES.PHONE_TYPE}) or {PHONES.PHONE_TYPE}= "O")

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top