Query to populate a field in an exists table

Richard-B

New member
Local time
Today, 20:13
Joined
Dec 28, 2021
Messages
4
I have a table containing 1.6 million reacts.
I want to take the date in the table and populate another field in the same table.
The table is index.
I was going to use an append query but I can not get it working

This is what I want to do.
Date field example 12/10/2021 = DayMonth field 12/10

1641508526945.png
 
Hi. Welcome to AWF!

Have you tried using a Calculated Column?
 
use query and add a Calculated column.
the query is more versatile and you don't need
to do an Update everytime there is new Date or new record
being added.
 
To your question, you should not use an APPEND query but a SELECT query to calculate the total. Then in that SELECT query you would use the Day() and Month() functions:



Additionally, you have some bad names for fields:

1. Spaces should not be in names. Makes coding and querying harder. Instead use an underscore: [Obs N] -> [Obs_N], [Site quoted] -> [Site_quoted]

2. Don't use reserve words as names. [Date] should not be a field name because its a built in function name. Instead name it for what that date represents (e.g. SurveyDate). You can find of all reserved words here:

 

Users who are viewing this thread

Back
Top Bottom