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 / November 2005

Tip: Looking for answers? Try searching our database.

Update Query - Expression to Delete Rows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
orbojeff - 21 Nov 2005 01:08 GMT
I setup an Update Query and I would like to Build and Expression to
Delete a row if the Field Value is Null or "0"
What would the Expression look like?

Thanks
Jeff
Allen Browne - 21 Nov 2005 02:00 GMT
Jeff, this will be a different query--a Delete query instead of an Update
query.

This kind of thing:
DELETE FROM Table1 WHERE (Table1.Field1 Is Null) OR (Table1.Field1 = 0);

If Field1 is a Text type field (not a Number type field), put quotes around
the zero.

If your field of table names contain spaces or strange characters, put
square brackets around each name.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I setup an Update Query and I would like to Build and Expression to
> Delete a row if the Field Value is Null or "0"
> What would the Expression look like?
>
> Thanks
> Jeff
Duane Hookom - 21 Nov 2005 02:02 GMT
The where clause might look like:
WHERE Nz([the un-named field],0)=0

Signature

Duane Hookom
MS Access MVP
--

>I setup an Update Query and I would like to Build and Expression to
> Delete a row if the Field Value is Null or "0"
> What would the Expression look like?
>
> Thanks
> Jeff
 
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.