Today's Poser .. (1 Viewer)

daievans

Registered User.
Local time
Today, 06:05
Joined
Apr 3, 2013
Messages
75
I have some code that among other things processes text files. These text files contain individual records and lots of other "rubbish" (not really) that we don't need to track or save. Having processed the file and sanitized the records to reflect only the information we want to record, we write these records to a table - let's call that Details. In another table, I call Vault, I write the filename, date of file, size, file extension and some other entity details. I have a MakeTable query that sums and counts some of the fields in Details for each particular filename we process. The MakeTable Query sums the field Balance and Counts the number of records and works. I run into my problem when I try to write the query to the record in vault that equals the filename we processed.

Here's the Update Query SQL Code -
Code:
UPDATE Vault AS V 
INNER JOIN tblTempCountTotalBal AS T ON V.Processed_File = T.Processedfile 
SET V.Balance = T.SumBal
WHERE (((V.Processed_File)="SJF_AHC20130430-XXX-01.TXT "));

If I hard code a number in for T.SumBal - it gets written to the Table - but asking it to write T.SumBal returns nothing even though T.SumBal has a value in it ..
:banghead:


Well - its later here and I've somehow solved it by removing the Inner Join statement ...this works but I'm not certain why ... If Wigan can win the FA Cup, I can learn Access ;)

Code:
UPDATE Vault AS V, tblTempCountTotalBal AS T 
SET V.Balance = T.SumBal
WHERE (((V.Processed_File)="MHR_XAM20130510-RTN-01.txt "));
:D:D
 
Last edited:

jdraw

Super Moderator
Staff member
Local time
Today, 09:05
Joined
Jan 23, 2006
Messages
15,409
Why do you have a trailing space in your filename?
 

Users who are viewing this thread

Top Bottom