Results 1 to 3 of 3
  1. #1
    Dude to Access Dude is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    4

    Question How can I update the following in one single query?

    Hi everyone, this is my first post in AccessForums.net and seeking some advice from the experts as I'm beginning to learn Access.

    I have a database in Access where I have blank spaces (in red):

    Click image for larger version. 

Name:	Others Update.jpg 
Views:	8 
Size:	48.4 KB 
ID:	17444

    I want to update these blanks with the label 'Others' as shown in the green table. I am able to do this through separate Update Queries as the example below:



    Click image for larger version. 

Name:	query.jpg 
Views:	8 
Size:	10.2 KB 
ID:	17446

    Is there a way I could do it all Display/Proc/OS/RAM/HDD in the same query to keep my DB query clean as possible? This is the SQL code made by the Access wizard for Display:

    UPDATE [Features] SET [Features].[Display] = "Others"
    WHERE ((([Features].[Display]) Is Null));

    Thank you all in advance,
    Dude

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    UPDATE Features SET Display=Nz(Display, "Others"), Proc=Nz(Proc, "Others"), OS=Nz(OS, "Others"), Ram=Nz(RAM, "Others"), HDD=Nz(HDD, "Others");
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Dude to Access Dude is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    4
    Awesome, works like charm! Thank you!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Update and append with single query
    By FinChase in forum Queries
    Replies: 1
    Last Post: 07-01-2014, 11:04 AM
  2. Replies: 1
    Last Post: 08-30-2011, 07:35 AM
  3. Single Record Update Query from a Form
    By Steven.Allman in forum Access
    Replies: 0
    Last Post: 03-30-2011, 09:34 AM
  4. Exporting single query and single report.
    By rfhall50 in forum Programming
    Replies: 2
    Last Post: 02-18-2011, 12:08 PM
  5. Multiple UPDATE in single query
    By nishezaman in forum Access
    Replies: 0
    Last Post: 12-13-2009, 01:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums