Results 1 to 3 of 3
  1. #1
    manwe_sulimo is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    9

    problem with union query with dateadd

    halo all



    i have very simple union query :

    SELECT [lastT].[VNid], [[lastT].Expr2, [[lastT].[nextTT]
    FROM [[lastT]
    UNION ALL
    SELECT [[lastT].[VNid], [[lastT].Expr2, [[lastT].[nextTY]
    FROM [[lastT]

    basically, i have query with ID column and 2 calculated columns that use dateadd function, and i want to create 2 columns query which list all the ID and the dates.

    when i try to run the query, i get messege that the data types isn't match (and i have the same data, double check it - both are dates and work on the type of calculataions)

    any idea???

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    But you show a 3-column UNION, not 2. Are nextTT and nextTY the calculated date fields? Why don't you give Expr2 a meaningful name?

    Post the lastT query.
    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
    manwe_sulimo is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Jan 2015
    Posts
    9
    hi
    thx for the answer.
    i just found out that the original field that used for the "number" data in DateAdd was NULL in some rows, once i set the value to 0 its working.

    :-)

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

Similar Threads

  1. Problem with DateAdd
    By Lo-Wang in forum Queries
    Replies: 6
    Last Post: 02-13-2019, 10:55 AM
  2. excel to union query problem
    By gkaro in forum Access
    Replies: 2
    Last Post: 03-27-2014, 08:43 PM
  3. dateadd problem
    By sdel_nevo in forum Forms
    Replies: 1
    Last Post: 03-21-2014, 04:32 AM
  4. Relationship and Union Query Problem.
    By burrina in forum Access
    Replies: 4
    Last Post: 12-23-2012, 10:33 PM
  5. Union query problem
    By andreei87 in forum Queries
    Replies: 5
    Last Post: 05-09-2011, 09:39 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