472,146 Members | 1,288 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

Conversion failed when converting the varchar value to data type bit.

31
When I try to insert values into an existing table, I am getting the following error. The table is not in bit data type format and neither is the target table. Conversion failed when converting the varchar value 'JOHN KUCHTA' to data type bit. Please help.
JOELL
Aug 15 '10 #1

✓ answered by NeoPa

No worries Joell. We all started somewhere.

With code like this though, particularly with SELECT *, I think we'll need some meta-data for the two tables. Please list all the fields in both tables and give their data types. I can't promise much as my SQL Server (T-SQL) is a bit rusty, but if it's something I can see I'll be happy to help.

5 6556
NeoPa
32,499 Expert Mod 16PB
You want us to find the problem with your code without seeing the code?

Come on. Let's start with the basics at least.
Aug 15 '10 #2
Joell
31
I am sorry I didnt send before. I am new to this type of help.

Here is my simple code:

INSERT PROF
select * from Chicaco_TEST


I have now checked all of the BIT data types and none of them are NULL. I dont know why the error message says it is a BIT type when neither the source or target table for that field is data type BIT.
Aug 15 '10 #3
NeoPa
32,499 Expert Mod 16PB
No worries Joell. We all started somewhere.

With code like this though, particularly with SELECT *, I think we'll need some meta-data for the two tables. Please list all the fields in both tables and give their data types. I can't promise much as my SQL Server (T-SQL) is a bit rusty, but if it's something I can see I'll be happy to help.
Aug 16 '10 #4
Joell
31
Thank you for your help. I completed started over and made the insert using all fields instead of using the * for all. Populating a value for each field worked. I appreciate the help.
Aug 16 '10 #5
NeoPa
32,499 Expert Mod 16PB
You're too kind Joell. It seems you responded well to a little nudge, and managed to find a solution on your own. Good for you :)
Aug 16 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.