Loading...
Wednesday, March 5, 2014

Equivalence DUAL table in MS Access

There might be a time that you want to run query like Oracle

select sysdate from dual;

Unfortunately, MS Access does not have dual table or something similar build in with it.

The working around solution is creating table DUAL with one field and add one row of data to it, i.e. 'X' to be the same as oracle, then you are good to go.


Table: Dual 
Field Name Data Type
DUMMY  Text(1)

Data
DUMMY
X

The equivalent query for the above query in MS Access would be:

select now() as sysdate from dual;

4 comments:

  1. A little old post, but I had this problem today. So if someone still needs a smaller solution:
    You can also omit the entire "FROM" part in Access.
    For example:
    SELECT NOW () AS SysDate;

    Works for me (Access 2016).

    ReplyDelete
  2. Casino of the Day | Best Air Jordan 11 Retro
    Casino of the good air jordan 23 retro Day. With 40 of the Air Jordan 10 Retro Outlet newest releases, 바카라 사이트 including an amazing selection of exclusive 출장마사지 casino games Wholesale jordan 11 retro and exclusive bonuses from the best

    ReplyDelete
  3. What to do if online game play loses popularity? - ChoEomachine
    If a player's game loses popularity during the game play you could lose your game status because of a lot of social networks and 카지노 sites/betting websites krfirst that allow you to

    ReplyDelete

 
TOP