Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

CONVERSION DATATYPE Expand / Collapse
Author
Message
Posted Wednesday, January 2, 2013 5:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 4, 2014 1:08 AM
Points: 3, Visits: 77
ERROR:The data types varchar and bit are incompatible in the add operator.

CAN ANY ONE KNOW WHAT TYPE OF ERROR IS THIS

CAN U FIND IT PLS
Post #1401799
Posted Wednesday, January 2, 2013 5:57 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Monday, October 13, 2014 6:42 AM
Points: 5,216, Visits: 5,111
You cant add a bit to a varchar or a varchar to a bit.

What are you trying to do, string concatenation?

Please provide details of your task at hand.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1401801
Posted Wednesday, January 2, 2013 6:39 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:53 AM
Points: 13,890, Visits: 28,285
You'll have to CAST one of the data types to one or the other in order to combine them.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1401813
Posted Wednesday, January 2, 2013 6:48 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 11:03 AM
Points: 20,734, Visits: 32,507
lathish2kumar (1/2/2013)
ERROR:The data types varchar and bit are incompatible in the add operator.

CAN ANY ONE KNOW WHAT TYPE OF ERROR IS THIS

CAN U FIND IT PLS


It is in your code, which you didn't post. Hard to help you find it when we can't see it. Also, please use your inside voice, there is no need to yell. (In other words, drop the typing in ALL CAPS.)



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1401816
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse