SQL Server 2008 Stored Procedure -
I can not store the data data type variable by using stored functions My code is: Optional process [dbo]. [Access1Register] - Added parameters to the stored procedure here to stop additional result set at @MobileNumber int, @CitizenName varchar (50), @ dub variable (8), @ verification code - SET NOCOUNT - Interference with SELECT statement. Set nosenate on; - Insert the statement for the process here Select CAST (@ as DAB) Prices for Access 1 (Mobile No, Citizen, DOB, Verification Code) (@ Mobile Number, @ Citizen Name, @ Dub, @ Verification Code) Log in If I execute this process, then it is being executed, but there is an error in the date type variable. This error is invalid item '-' . As it is to raise. It depends on how you pass in the @ dub values . Your best bet is to use the iOS 8601 format - 'YYYYMMDD' - since it will always change correctly in DATE - regardless of your language and regional settings on your SQL Server machine.