D
DamonECii
Hello Everybody,
I'm using A97 on W2K and having problems with the results of my query.
Bringing in ALL records from the tbl_ImpRawFile with no WHERE works
great, but when the criteria IS NULL to avoid duplicates, no records
are appended.
INSERT INTO tbl_Fuel_Trans_ALL ( TransDate, SiteNum, TransNum,
TransTime, Employee, VehEquipNum, Odom_Hrs, PumpNum, ProdNum, Gallons)
SELECT Mid([TransDate],5,2) & "/" & Right([TransDate],2) & "/" &
Left([TransDate],4) AS Expr2, tbl_ImpRawFile.SiteNum,
tbl_ImpRawFile.TransNum, tbl_ImpRawFile.TransTime,
tbl_ImpEmployeeFile.Field2, tbl_ImpRawFile.VehEquipNum,
tbl_ImpRawFile.Odom_Hrs, tbl_ImpRawFile.PumpNum,
tbl_ImpRawFile.ProdNum, [Gallons]/1000 AS Expr1
FROM tbl_ImpRawFile LEFT JOIN tbl_ImpEmployeeFile ON
tbl_ImpRawFile.Employee_ID = tbl_ImpEmployeeFile.Field1
ORDER BY tbl_ImpRawFile.SiteNum, tbl_ImpRawFile.TransNum;
WHERE (((tbl_Fuel_Trans_ALL.TransDate) Is Null) AND
((tbl_Fuel_Trans_ALL.SiteNum) Is Null) AND
((tbl_Fuel_Trans_ALL.TransNum) Is Null) AND
((tbl_Fuel_Trans_ALL.TransTime) Is Null))
ORDER BY tbl_ImpRawFile.SiteNum, tbl_ImpRawFile.TransNum;
The background for this task involves a text file that's generated by
a fuel station data concentrator. After importing the data wanted I
then append the 'new' records to the tbl_Fuel_Trans_ALL table. In the
process I reformat the TransDate and Gallons fields.
Thanks in Advance.
I'm using A97 on W2K and having problems with the results of my query.
Bringing in ALL records from the tbl_ImpRawFile with no WHERE works
great, but when the criteria IS NULL to avoid duplicates, no records
are appended.
INSERT INTO tbl_Fuel_Trans_ALL ( TransDate, SiteNum, TransNum,
TransTime, Employee, VehEquipNum, Odom_Hrs, PumpNum, ProdNum, Gallons)
SELECT Mid([TransDate],5,2) & "/" & Right([TransDate],2) & "/" &
Left([TransDate],4) AS Expr2, tbl_ImpRawFile.SiteNum,
tbl_ImpRawFile.TransNum, tbl_ImpRawFile.TransTime,
tbl_ImpEmployeeFile.Field2, tbl_ImpRawFile.VehEquipNum,
tbl_ImpRawFile.Odom_Hrs, tbl_ImpRawFile.PumpNum,
tbl_ImpRawFile.ProdNum, [Gallons]/1000 AS Expr1
FROM tbl_ImpRawFile LEFT JOIN tbl_ImpEmployeeFile ON
tbl_ImpRawFile.Employee_ID = tbl_ImpEmployeeFile.Field1
ORDER BY tbl_ImpRawFile.SiteNum, tbl_ImpRawFile.TransNum;
WHERE (((tbl_Fuel_Trans_ALL.TransDate) Is Null) AND
((tbl_Fuel_Trans_ALL.SiteNum) Is Null) AND
((tbl_Fuel_Trans_ALL.TransNum) Is Null) AND
((tbl_Fuel_Trans_ALL.TransTime) Is Null))
ORDER BY tbl_ImpRawFile.SiteNum, tbl_ImpRawFile.TransNum;
The background for this task involves a text file that's generated by
a fuel station data concentrator. After importing the data wanted I
then append the 'new' records to the tbl_Fuel_Trans_ALL table. In the
process I reformat the TransDate and Gallons fields.
Thanks in Advance.