fboehlandt
Registered User.
- Local time
- Today, 23:19
- Joined
- Sep 5, 2008
- Messages
- 90
Hi everyone,
I am running a query in an access database that consists of three tables labeled: ASSETS, RETURNS, ADMINISTRATIVE. The query looks as follows:
Which runs fine in access. The problem is, however, that I want to export the information to an excel-based pivottable. When I copy the query into the command text field of the connection properties and refresh the connection, I only receive nulls as values in my pivottable. I have narrowed down the problem to the IIF(IsNull() statement in the query. This must be causing problems when trying to export data to a pivottable. Is it possible that the IsNull function is unique to Access? What would be the alternative if so?
p.s. it is the purpose of the query to write a null when there is no entry in the Assets column (as there are more date entries MM_DD_YYYY as there are asset entries).
I am running a query in an access database that consists of three tables labeled: ASSETS, RETURNS, ADMINISTRATIVE. The query looks as follows:
Code:
SELECT RETURNS.Codes, RETURNS.Fundname, ADMINISTRATIVE.Main_Strategy, RETURNS.MM_DD_YYYY,
[COLOR=red]IIf(IsNull([ASSETS.Assets]), "0",[ASSETS.Assets]) AS Assets[/COLOR]
FROM ADMINISTRATIVE INNER JOIN (RETURNS LEFT JOIN ASSETS ON (RETURNS.Code = ASSETS.Code) AND (RETURNS.MM_DD_YYYY = ASSETS.MM_DD_YYYY)) ON ADMINISTRATIVE.Code = RETURNS.Code;
Which runs fine in access. The problem is, however, that I want to export the information to an excel-based pivottable. When I copy the query into the command text field of the connection properties and refresh the connection, I only receive nulls as values in my pivottable. I have narrowed down the problem to the IIF(IsNull() statement in the query. This must be causing problems when trying to export data to a pivottable. Is it possible that the IsNull function is unique to Access? What would be the alternative if so?
p.s. it is the purpose of the query to write a null when there is no entry in the Assets column (as there are more date entries MM_DD_YYYY as there are asset entries).