Snowflake68
Registered User.
- Local time
- Today, 17:48
- Joined
- May 28, 2014
- Messages
- 452
I am using Access to face off an SQL 2012 database. I am trying to create an auto id that is formatted like this 0000. I understand that you cannot easily format an Identity column but I have found an sql statement that works when I run it within SQL server but I need to have a query within Access itself that will update another column based on the auto id column.
This is the sql statement that I need to run in Access but when I do I get a Syntax error (missing operator) in query expression. Can anyone help me with amending the query so that it works in Access please.
Hope someone can help please.
This is the sql statement that I need to run in Access but when I do I get a Syntax error (missing operator) in query expression. Can anyone help me with amending the query so that it works in Access please.
Code:
SELECT RIGHT('0000'+CAST(MyColumn AS VARCHAR(4)),4) AS [Identity] FROM MyTable
Hope someone can help please.