More SQL help!

Can somebody give me a query which will return from my HQ database all items which have no tax assigned (via the store tax tab in HQ)

Thanks again!

Reply to
Philip Gass
Loading thread data ...

This is what I run periodically to check for no tax ...

SELECT ITEMDYNAMIC.STOREID AS 'Store ID', ITEM.ITEMLOOKUPCODE AS 'Item', ITEM.DESCRIPTION AS 'Description', ITEM.BINLOCATION AS 'Bin Location', ITEMDYNAMIC.QUANTITY AS 'Quantity', ITEM.PRICE AS 'Price', ITEMDYNAMIC.TAXID AS 'Tax ID' FROM ITEMDYNAMIC LEFT JOIN ITEM ON ITEM.ID = ITEMDYNAMIC.ITEMID WHERE ITEMDYNAMIC.TAXID IS NULL

"Philip Gass" wrote:

Reply to
Luminox

Or you could simply type

select * from item where taxid=null

This will provide you with all the nulls but of course if you have incorrect taxids in there you wont see them. I know its unlikely that you do but ive seen it happen before so what you can do is type

select * from item where taxid1 and taxid2

This assumes that your 2 taxids are 1 and 2 of course, change these as you need to

"Philip Gass" wrote:

Reply to
Gaz

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.