I have a select command, and it returns answer records, but it also gives an error in Visual Studio 2010's query builder with this query:
SELECT *
FROM Orders
WHERE (BCode = 025) AND (Date BETWEEN '1390%' AND '1391%') OR
(Date BETWEEN '1390%' AND '1391%') AND (MCode = 0123456789)
The error is:
Error Message: the conversion of nvarchar value "0854697543"
overflowed an int column
Data types are
BCode : nvarchar(50)
Date : nvarchar(50)
MCode : nvarchar(10)
Where is the problem?