Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011

    Unanswered: Help Please access append query error!

    I have a table I'm using as a source for an append query that calls upon a table query, which calls upon a union query to effectively adjust the eastern prevailing time to spring forward and fall back while converting to utc. there are only three fields in the table but I keep getting "access did not import .... due to type conversion". Please Help Me out!!! Thank you in advance

    below is the access sql:

    {append query} INSERT INTO somePrice ( price ) SELECT DTQuery.Price FROM DTQuery WHERE (((DTQuery.EPT)<>[2ndsunday]));

    {DTQuery} SELECT TransposeQuery.Field3 AS [Zone], DateSerial(Left([field1],4),Left(Right([field1],4),2),Right([field1],2))+[TransposeQuery]![Hour]/24 AS EPT, Val([Field8]) AS Price, DateValue(DateSerial(Year([EPT]),3,14))-(Weekday(DateValue(DateSerial(Year([EPT]),3,14)),1)-1)+3/24 AS 2ndSunday, DateValue(DateSerial(Year([EPT]),11,7))-(Weekday(DateValue(DateSerial(Year([EPT]),11,7)),1)-1)+3/24 AS 1stSunday FROM TransposeQuery ORDER BY TransposeQuery.Field3, DateSerial(Left([field1],4),Left(Right([field1],4),2),Right([field1],2))+[TransposeQuery]![Hour]/24, Val([Field8]);

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    Why do you use 'DTQuery' (which is awfully complex) in the APPEND query? All you need is 'Val([Field8]) AS Price' and 'DateValue(DateSerial(Year([EPT]),3,14))-(Weekday(DateValue(DateSerial(Year([EPT]),3,14)),1)-1)+3/24 AS 2ndSunday' that already come from a 'TransposeQuery' we know nothing about. Moreover aliases (AS...) and ORDER BY clauses are useless for the APPEND query.
    Have a nice day!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts