Quantcast
Viewing all articles
Browse latest Browse all 4871

Msg 248 and Msg 245 when Creating a View

I am trying to create a View that will bring an "Account Number", A "Balance Due" and a "Phone Number together from two different tables. When I try to Select top 1000 in the View I get two errors pertaining to the phone number Column

The conversion of the varchar value 'xxxxxxxxxx' overflowed an int column

and

Conversion failed when converting the varchar value 'xxx-xxx-xxxx' to data type int

I've tried simply CAST'ing it as NVARCHAR but that did not fix the issue. I know the problem is that some of the Phone numbers have Dashes therefore they cannot be integers and the ones that do not have dashes are to Big to be just INT. What I need to accomplish is for all phone numbers to be strings as they will need to be able to be be read by an IVR but I am not sure how to clean this data up.


Viewing all articles
Browse latest Browse all 4871


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>