Append Query

J

jimmy.kirk

I just recently wrote a script that uses an append query to add records
to a table. I just found out that the original timestamp I'm pulling is
in mountain time. Is there any way to update that on the fly while
running the append query?

Jimmy
 
J

jimmy.kirk

The Append Query in question...

INSERT INTO [Itemized Records] ( [Date], CustomerID, IntrType, Subject,
CreateOper )
SELECT Itemized.CREATE_DATETIME, Itemized.CUSTOMER_ID,
Itemized.INTR_TYPE, Itemized.SUBJECT, Itemized.CREATE_OPER
FROM Itemized;
 
J

John Vinson

I just recently wrote a script that uses an append query to add records
to a table. I just found out that the original timestamp I'm pulling is
in mountain time. Is there any way to update that on the fly while
running the append query?

Jimmy

Update to... what? Pacific time? GMT?

You can use the DateAdd function to convert the field:

INSERT INTO [Itemized Records] ( [Date], CustomerID, IntrType,
Subject,
CreateOper )
SELECT DateAdd("h", -1, Itemized.CREATE_DATETIME),
Itemized.CUSTOMER_ID,
Itemized.INTR_TYPE, Itemized.SUBJECT, Itemized.CREATE_OPER
FROM Itemized;

will convert Mountain to Pacific.

John W. Vinson[MVP]
 
Top