A stored procedure data type that allows the use of alphanumeric values

I have a stored procedure for SQL 2000 that has an input parameter with the varchar (17) data type to process the vehicle identifier (VIN), which is alphanumeric. However, whenever I enter a value for a parameter at runtime that has a digital digit in it, it gives me an error. It looks like it only accepts alphabetic characters. What am I doing wrong here?

+3
source share
2 answers

Based on the comments, there is a subtle SQL Server "function" that allows you to use the letters az as stored process parameters without delimiters. He was there forever (with 6.5 at least)

I'm not sure about the complete rules, but demonstrated in MSDN (rename SQL Server, etc.) : there are no delimiters around the "local" parameter. And I just found this KB article on it

In this case, it can start with a number that breaks. I assume this works for the contained number (but, as I said, I'm not sure about the complete rules).

Edit: Confirmed by Martin as "breaking with lead number", OK for "containing number"

+5
source

, - , . 2 VIN , , char (17) ov varchar (17), - VIN. -, , , - - , ?

-1

All Articles