Results 1 to 2 of 2
  1. #1
    baba is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    43

    How to use DUAL table in MSaccess to add rows to a query result


    How to add my own rows to a query in MsAccess ?

    I would like to do something like this:
    Select Name from Table 1 where age > 75
    Union Select "Joe" from Dual;

    Expected Result: If Joe is not found in Table 1 ,then it would be added to the result of the query.
    How can I do it in MsAccess as it does not use " DUAL" table. Thanks for the help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Don't know what you mean by "DUAL" table. You want to add specifically 'Joe' to this list of names? Just Joe? And why Joe?

    Select [Name] As Names from Table 1 where age > 75
    Union Select "Joe" From Table 1;
    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.

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

Similar Threads

  1. Learn MSAccess by playing MSAccess Jeopardy
    By pkstormy in forum Sample Databases
    Replies: 4
    Last Post: 11-17-2016, 07:27 AM
  2. Replies: 5
    Last Post: 04-28-2011, 05:10 PM
  3. Grouping dual keys in Access 2007 Report
    By bengineer in forum Reports
    Replies: 4
    Last Post: 02-01-2011, 02:09 PM
  4. MSACCESS Query with calculations?
    By Masterfinn in forum Queries
    Replies: 10
    Last Post: 02-24-2010, 10:51 AM
  5. MSACCESS Query
    By saa18 in forum Access
    Replies: 0
    Last Post: 11-14-2008, 05:12 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