Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Lester Vincent
Starting Member
22 Posts |
Posted - 2006-04-05 : 00:54:22
|
Hi People.I hope you can help with this one. I created a new SPROC, in Enterprise Manager (which also calls a UDF) to do some calculations. When I click the syntax checking button, it says,"Syntax Check Successful!"When I use debuggin in Query Analyser,the SPROC aborts quickly, then displays,the following message: -"[Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification"No Line number. Nothing else to tell what is wrong with it.At first, I had a couple of PRINT commands, some of which used the CAST function, to convert integers to text.I deleted all of these PRINT commands and tried again.Got the same thing.In case the changes had not registered, I then added "WITH RECOMPILE" to the SPROC (as per BOL formatting).No change. Got the same message.I do hope someone has experienced this before, as it's driving me bonkers!Cannot see anything wrong with the coding (have written about 50 previous SPROCS that work. OK I'm still a babe in the woods with SQL.)If you can help, please let me know asap.Regards,Lester Vincent Sydney |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2006-04-05 : 01:13:39
|
| My guess would be you have a date or a number you're trying to work with and it's inside a character based column. SOmewhere in your data there is something that won't parse that data type. "Invalid character value for cast specification" isn't really obscure.Perhaps if you posted some code and a table structure somebody can help more.Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
 |
|
|
|
|
|
|
|