How do i add a calculated column to an Access table in SQL?
I know i can add a column with SQL like this:
ALTER TABLE Clients ADD COLUMN AccountDate TEXT(60)
Thanks, Vítor
How do i add a calculated column to an Access table in SQL?
I know i can add a column with SQL like this:
ALTER TABLE Clients ADD COLUMN AccountDate TEXT(60)
Thanks, Vítor
You cannot add a calculated column with SQL because calculated field requires an expression and that cannot be supplied through SQL. Technically, a calculated field is a base type - int, double, text etc. Above the base type is an expression that helps Access do the math/logic.
You could use VBA to create a calculated column
As Gordon and BJones mentioned, you could create a view or saved query with relevant calculation.
I don't think MS Access supports computed columns. Instead, you can create a view:
What do you want it to calculate? Have you tried something like: