Importing Data from Access

R

rerhart

When I import data from an Access table, I have 'Yes/No' fields in
Access that when imported into Excel, display True or False. If I
export hte table from Access, the fields are either a '0' or a '1'.

When importing into Excel, how do I force Excel to display these Yes/No
- 0/1 filelds as 'Yes' or 'No' or 'Y' or 'N' in my spreadsheet as
opposed to 'True' and 'False'?

Thanks,
Rich
 
D

Debra Dalgleish

In Access, you could create a query, and add a calculated field to
convert the values to text "Yes" or "No". For example:

Active: IIf([tblSalesReps].[Active]=Yes,"Yes","No")

Or, in Excel, use Edit>Replace to replace zeros with No, and ones with
Yes, in the applicable columns.
 
J

Jamie Collins

rerhart wrote ...
When I import data from an Access table, I have 'Yes/No' fields in
Access that when imported into Excel, display True or False. If I
export hte table from Access, the fields are either a '0' or a '1'.

Boolean data types in DBMSs should be avoided (what is the value of
true: 1, -1, 'Yes'? what does a null value mean?) Solve the problem at
source e.g.

CREATE TABLE Tester
(
MyCol1 VARCHAR(2) NOT NULL
DEFAULT 'No',
CHECK (MyCol1 IN ('Yes','No'))
)
;

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top