Link to home
Start Free TrialLog in
Avatar of bill201
bill201

asked on

how to add a column to a exist table with a query in access 2013

hi

i want to add a coulumn to table that the values are format like percents something like this

ALTER TABLE SampleTable 
ADD COLUMN LO double (percent) 

Open in new window

Avatar of ChloesDad
ChloesDad
Flag of United Kingdom of Great Britain and Northern Ireland image

Its as you say, although you dont need the (percent)

ALTER TABLE SampleTable ADD COLUMN LO double

Double either takes no parameters or two parameters

See here for data types http://www.w3schools.com/sql/sql_datatypes.asp
Avatar of bill201
bill201

ASKER

But I want it look visually like a percent
The formatting of the value is normally done in the user interface not in the actual field in the database, so the value in the database would be 50.0 and you would format it to show 50.0% on screen.

If you manipulate the field manually using access then you can set the format property to percent, but I dont know if you can do that in SQL.
Avatar of bill201

ASKER

is there some other way how to do it with vba ?
ASKER CERTIFIED SOLUTION
Avatar of ChloesDad
ChloesDad
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial