Murray Brown
asked on
SQL Argument data type decimal is invalid for argument 1 of substring function.
Hi
I am trying to list all records where the number starts with a 2 but I get the error
Argument data type decimal is invalid for argument 1 of substring function.
I know that the following syntax doesn't work. What would the correct syntax be?
Select * From MARA_MBEW Where SubString([Total Stock],1, 1) = 2
I am trying to list all records where the number starts with a 2 but I get the error
Argument data type decimal is invalid for argument 1 of substring function.
I know that the following syntax doesn't work. What would the correct syntax be?
Select * From MARA_MBEW Where SubString([Total Stock],1, 1) = 2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Lokesh is correct, the best style for performance is:
Where [Total Stock] Like '2%'
Where [Total Stock] Like '2%'
ASKER
Thanks
Open in new window