ba_trainer
asked on
Query to show only IS NOT NULL
When I create the query in Access, in the design mode, I am using IS NOT NULL in the criteria area. However, it isn't working at all. I am still getting everything.
SELECT UI_ISH_PROD_DB_sales_contact.cust_acct_nbr, UI_ISH_PROD_DB_sales_contact.prim_bus_ph_area_cd, UI_ISH_PROD_DB_sales_contact.prim_bus_ph_nbr
FROM UI_ISH_PROD_DB_sales_contact
GROUP BY UI_ISH_PROD_DB_sales_contact.cust_acct_nbr, UI_ISH_PROD_DB_sales_contact.prim_bus_ph_area_cd, UI_ISH_PROD_DB_sales_contact.prim_bus_ph_nbr
HAVING (((UI_ISH_PROD_DB_sales_contact.prim_bus_ph_nbr) Is Not Null));
SELECT A.cust_acct_nbr, A.prim_bus_ph_area_cd, A.prim_bus_ph_nbr
FROM UI_ISH_PROD_DB_sales_conta ct as A
where A.prim_bus_ph_nbr Is Not Null
GROUP BY A.cust_acct_nbr, A.prim_bus_ph_area_cd, A.prim_bus_ph_nbr
FROM UI_ISH_PROD_DB_sales_conta
where A.prim_bus_ph_nbr Is Not Null
GROUP BY A.cust_acct_nbr, A.prim_bus_ph_area_cd, A.prim_bus_ph_nbr
ASKER
asvforce: - I get an error message regarding IFNULL
peter57r: - It doesn't change anything except for the table name.
peter57r: - It doesn't change anything except for the table name.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT UI_ISH_PROD_DB_sales_conta
FROM UI_ISH_PROD_DB_sales_conta
GROUP BY UI_ISH_PROD_DB_sales_conta
HAVING IFNULL(UI_ISH_PROD_DB_sale