Add new column, field name as current date i

Rider570

New member
Local time
Tomorrow, 03:15
Joined
Dec 23, 2021
Messages
1
Hi ,

I need to add a column to my existing table when each time I run my query. The catch is column name must be the current date and time stamp.

Cheers,
 
Hi. Welcome to AWF!

Not sure your question is clear. Can you elaborate a bit?
 
I need to add a column to my existing table

If you find you need to add a column to a table like this, then 99 times out of 100 you've got your database structure completely wrong...

It sounds like you've shifted Excel data into MS Access and are continuing to to work in the same manner you are used to in Excel.

Unfortunately you can get along quite nicely working like this, but eventually, (within days) you will run into a brick wall. You can read up about the problems you face if you continue with a badly structured database on my website here:-

 
If you are talking about updating an existing column, you can do it if your query is an update or append query. Just use the Now() function if you want to change the LastUpdateDT column to the current date/time.

You can use DDL which is the Data Definition Language SQL section, to modify table structures but as Uncle already mentioned, you would never ever add a column with a name = to the current date/time.
 

Users who are viewing this thread

Back
Top Bottom