Basic SQL

Jun 13, 2007 3 Replies

Can somebody give me an SQL which will return all items which currently have no supplier assigned at all?



Thanks!


-- This is to get items that have no records in the supplier tab.

select itemlookupcode,description

from item left join supplierlist

on item.id=itemid

where itemid is null

order by Itemlookupcode

/* To get items that does not have supplier

Select itemlookupcode,description

Fron Item

Where Supplierid=0 */

"Philip Gass - Creative Gardens -" wrote in message news:% snipped-for-privacy@TK2MSFTNGP04.phx.gbl...

Select * From Item Where SupplierID = 0

"Philip Gass - Creative Gardens -" wrote in message news:% snipped-for-privacy@TK2MSFTNGP04.phx.gbl...

That assumes that all supplier & item edits have been done through the RMS UI (and that nothing has gone wrong anyway). The left join between Item and SupplierList is a better choice.

Glenn Adams Tiber Creek C> Select * From Item Where SupplierID = 0

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required