Deniseobx
07-03-2007, 06:16 AM
Hello everyone,
I need help modifying my query:
SELECT DISTINCT EqInitial, EqNr, LastEventDt, DateDiff("d", StartDt, Date() ) AS TotalDays
FROM EQUIPMENT;
The table Equipment is populated with data that comes from a third party so I cannot change it. Sometimes the StartDt field of this table has no data and when executing the query above the DateDiff function will obviously not return anything for the TotalDays field of that particular record.
I need to populate the TotalDays field with 1 everytime the StartDt fields has no data.
I though about using the IIF function, but I’m not sure if this is the best approach and I don’t know the syntax to “make” the TotalDays field show 1. :confused:
Your help is greatly appreciated .
I need help modifying my query:
SELECT DISTINCT EqInitial, EqNr, LastEventDt, DateDiff("d", StartDt, Date() ) AS TotalDays
FROM EQUIPMENT;
The table Equipment is populated with data that comes from a third party so I cannot change it. Sometimes the StartDt field of this table has no data and when executing the query above the DateDiff function will obviously not return anything for the TotalDays field of that particular record.
I need to populate the TotalDays field with 1 everytime the StartDt fields has no data.
I though about using the IIF function, but I’m not sure if this is the best approach and I don’t know the syntax to “make” the TotalDays field show 1. :confused:
Your help is greatly appreciated .