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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Joell
    New Member
    • Aug 2007
    • 31

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

    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
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32662

    #2
    You want us to find the problem with your code without seeing the code?

    Come on. Let's start with the basics at least.

    Comment

    • Joell
      New Member
      • Aug 2007
      • 31

      #3
      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.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        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.

        Comment

        • Joell
          New Member
          • Aug 2007
          • 31

          #5
          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.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32662

            #6
            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 :)

            Comment

            Working...