Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2012
    Posts
    15

    Unanswered: Interesting Excel Linked Table Result

    Hi,

    I have a query in Access essentially says

    Code:
    select iif(a.xyz is null, "D","I") from table as a;
    If I view this query in Access, I correctly see D next to any field where xyz is null. If, however, I link this query to an Excel table, the D now flips to I when xyz is null. I have found that if I change the query to say a.xyz = "", the view in Access is now incorrect, but the data interpretation from Excel is now correct.

    Does anyone have a better solution or more insight into the issue?

    Thanks,

    Eric

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    I don't think an empty cell in excel is null. If I'm not mistaken, it's either an empty string or 0, depending on the cell format.

    try select iif(nz(a.xyz,"")="", "D","I") from table as a;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •