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 / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Including records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rml - 06 Jul 2006 19:47 GMT
I have a query that pulls back all records that have a >0 value.  It works
fine.  The problem is that I have a few records that contain a 0 value that I
would like to include in my results.  These results include part number,
price and descritions fields.  Maybe I can use the part number to include
those records? How can I achieve both?

Thanks.
Rick B - 06 Jul 2006 20:12 GMT
Just use an "OR" condition.

Part Number = "xxxx" *OR* value is >0

Signature

Rick B

>I have a query that pulls back all records that have a >0 value.  It works
> fine.  The problem is that I have a few records that contain a 0 value
[quoted text clipped - 4 lines]
>
> Thanks.
MGFoster - 06 Jul 2006 21:30 GMT
> I have a query that pulls back all records that have a >0 value.  It works
> fine.  The problem is that I have a few records that contain a 0 value that I
> would like to include in my results.  These results include part number,
> price and descritions fields.  Maybe I can use the part number to include
> those records? How can I achieve both?

The WHERE clause of the query:

WHERE column_name > 0
   OR (column_name = 0 AND part_nbr = 1234)

Signature

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

 
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.