setting a sql bit field

I have an excel spreadsheet and I am importing it into sql.  One column is True or False,
How do I map it to a column that is of datatype bit?
Who is Participating?
PortletPaulConnect With a Mentor Commented:
1 = true
0 = false

change the column data in Excel perhaps? (i.e. to exclusively 1 or 0, no nulls, and not text 'True' 'False')
Aaron ShiloChief Database ArchitectCommented:
where is the problem just directly map the column .

do you get an error?
Jeff_KingstonAuthor Commented:
No, I just get null in all rows regardless of the true/false value in the imported field.
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Aaron ShiloChief Database ArchitectCommented:
well i guess the fastest way for you is to load the excell into a STAGE table with column type Nvarchar and then move the data into your permanent table.
Harish VargheseProject LeaderCommented:
Hello Jeff,

Ideally, a column of boolean values TRUE/FALSE in Excel should be automatically mapped to bit field when you import into SQL Server table. I tried a sample file and it works fine for me. Would you mind attaching the file here, after removing any sensitive info?

Jeff_KingstonAuthor Commented:
Worked like a dream.  Thanks
excellent. have fun.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.