If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Help Please access append query error!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-16-11, 01:49
jeremiaht jeremiaht is offline
Registered User
 
Join Date: Dec 2011
Posts: 1
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]);
Reply With Quote
  #2 (permalink)  
Old 12-16-11, 04:11
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
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!
Reply With Quote
Reply

Tags
access, append query, at a loss

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On