[AccessD] SQL question (wich item isn't in the table?)

DJK(John) Robinson djkr at msn.com
Wed Aug 13 07:56:59 CDT 2003


SD

I don't think you can (just modify it), since the query is essentially
reporting *only*  on the table ClientID - just using the 'Where...In...'
clause to limit the number of records returned from ClientID.

To do what you want, you need to be reporting on your list of IDs instead,
so I don't see how you could do it apart from having them in their own
table, and then employing the usual technique of an outer join and a test
for Null.  Or perhaps a NOT IN.

John


> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Sad Der
> Sent: 13 August 2003 12:40
> To: Acces User Group
> Subject: [AccessD] SQL question (wich item isn't in the table?)
> 
> 
> Hi,
> 
> can anybody help me with this. 
> I've got this query:
> SELECT DISTINCT cid.ID 
> FROM ClientID cid
> WHERE cid.ID IN ('156','157')
> 
> Model of table ClientID:
> (ID number(3))
> Data of table ClientID:
> ID
> 157
> 158
> 159
> 
> It shows all id's from the where clause that are in
> the table, wich is 157.
> 
> How do I modify it so that it now shows all id's that
> are not in the table (156)
> 
> thnx
> 
> SD
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design 
> software http://sitebuilder.yahoo.com 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com
> 


More information about the AccessD mailing list