Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

WHERE CLAUSE PRoblems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tmaxwell - 15 May 2007 18:45 GMT
I built this query from 3 tables. I set the Where conditions to return “293V”
from CUSTOMER_GROUP, >-99999999 from QUANTITY_FROM, “GENERAL” from ITEM_GROUP
and “4/3/2007”  From EFFECTIVE_DATE. It pulls everything except the 293V and
the 4/3/2007 here it give me all the data. I set the properties to Unique
Value and it worked and then I coded some more then, it didn’t work. ?

SELECT  DISTINCT [GENERAL F4072 TEST].[2NDITEMNUM] as MODEL, [ITEM CUSTOMER
ID F4094].CUSTOMERGR as CUSTOMER_GROUP, [GENERAL F4072 TEST].QUANTITYFR as
QUANTITY_FROM, [GENERAL F4072 TEST].FACTORVALU, [GENERAL F4072
TEST].AMOUNTPRIC, [GENERAL F4072 TEST].BASKETREPR as BASKET_REPRICE, [GENERAL
F4072 TEST].ITEMGROUP, F4101.DESCRIPTIO, [GENERAL F4072 TEST].FRMCDE as
FORM_CODE, [GENERAL F4072 TEST].EFFECTIVED as EFFECTIVE_DATE

FROM ([GENERAL F4072 TEST] LEFT JOIN [ITEM CUSTOMER ID F4094] ON [GENERAL
F4072 TEST].ITEMCUSTKE = [ITEM CUSTOMER ID F4094].ITEMCUSTKE) LEFT JOIN F4101
ON [GENERAL F4072 TEST].[2NDITEMNUM] = F4101.[2NDITEMNUM]

WHERE ((([ITEM CUSTOMER ID F4094].CUSTOMERGR)="293V") AND (([GENERAL F4072
TEST].QUANTITYFR)>-999999999) AND (([GENERAL F4072
TEST].ITEMGROUP)="GENERAL") AND (([GENERAL F4072
TEST].EFFECTIVED)=#4/3/2007#)) OR ((([GENERAL F4072
TEST].QUANTITYFR)>-99999999));
Jerry Whittle - 15 May 2007 19:20 GMT
If “4/3/2007” is in a true date/time field, it should be #4/3/2007# .
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> I built this query from 3 tables. I set the Where conditions to return “293V”
> from CUSTOMER_GROUP, >-99999999 from QUANTITY_FROM, “GENERAL” from ITEM_GROUP
[quoted text clipped - 18 lines]
> TEST].EFFECTIVED)=#4/3/2007#)) OR ((([GENERAL F4072
> TEST].QUANTITYFR)>-99999999));
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.