A
Amelia
Table1: DummyID, Name, City
111, John, Chicago
233, Nancy, Omaha
422, Sam, Cincinnati
Table2: DummyID, StartDate, Quantity
111, 02/11/2002, 53
233, 03/12/2003. 75
SELECT Table1.DummyID, Table1.Name, Table2.StartDate,
Table2.Quantity
FROM Table1 Left Join Table2 ON (Table1.DummyID =
Table2.DummyID)
Results are 3 records
111, John, 02/11/2002, 53
233, Nancy, 03/12/2003. 75
422, Sam, #Error,
I've tried converting null values to zero:
SELECT Table1.DummyID, Table1.Name, CDate(Nz
(Table2.StartDate,0)), CLng(Nz(Table2.Quantity,0))
FROM Table1 Left Join Table2 ON (Table1.DummyID =
Table2.DummyID)
This is an approach that I've used before, but it is not
working this time.
Results are 3 records
111, John, 02/11/2002, 53
233, Nancy, 03/12/2003. 75
422, Sam, #Error, 0
How can I get rid of the #Error result. Zero is an
acceptable value.
I've tried
IIf(IsNull(Table2.StartDate),0,Table2.StartDate)
IIf(IsMissing(Table2.StartDate),0,Table2.StartDate)
IIf(IsError(Table2.StartDate),0,Table2.StartDate)
All of these result in a #Error value Table2.StartDate,
where the Table1.DummyID is not in Table2.
Any suggestions?
111, John, Chicago
233, Nancy, Omaha
422, Sam, Cincinnati
Table2: DummyID, StartDate, Quantity
111, 02/11/2002, 53
233, 03/12/2003. 75
SELECT Table1.DummyID, Table1.Name, Table2.StartDate,
Table2.Quantity
FROM Table1 Left Join Table2 ON (Table1.DummyID =
Table2.DummyID)
Results are 3 records
111, John, 02/11/2002, 53
233, Nancy, 03/12/2003. 75
422, Sam, #Error,
I've tried converting null values to zero:
SELECT Table1.DummyID, Table1.Name, CDate(Nz
(Table2.StartDate,0)), CLng(Nz(Table2.Quantity,0))
FROM Table1 Left Join Table2 ON (Table1.DummyID =
Table2.DummyID)
This is an approach that I've used before, but it is not
working this time.
Results are 3 records
111, John, 02/11/2002, 53
233, Nancy, 03/12/2003. 75
422, Sam, #Error, 0
How can I get rid of the #Error result. Zero is an
acceptable value.
I've tried
IIf(IsNull(Table2.StartDate),0,Table2.StartDate)
IIf(IsMissing(Table2.StartDate),0,Table2.StartDate)
IIf(IsError(Table2.StartDate),0,Table2.StartDate)
All of these result in a #Error value Table2.StartDate,
where the Table1.DummyID is not in Table2.
Any suggestions?