Murray Brown
asked on
SQL get all dates beginning with 2
Hi
I use the following SQL statement to get all decimal values beginning with 2
Select * From MARA_MBEW Where SUBSTRING(CAST([Total Stock] AS VARCHAR),1, 1) = 2
I try to do the same thing with a date column using the following statement but it doesn't seem to work
Select * From MARA_MBEW Where SUBSTRING(CAST([MyDate] AS VARCHAR),1, 1) = 2
I use the following SQL statement to get all decimal values beginning with 2
Select * From MARA_MBEW Where SUBSTRING(CAST([Total Stock] AS VARCHAR),1, 1) = 2
I try to do the same thing with a date column using the following statement but it doesn't seem to work
Select * From MARA_MBEW Where SUBSTRING(CAST([MyDate] AS VARCHAR),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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Indeed. We can use an asker clarification on what 'date beginning with 2' means.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot for the help. As it turns out the idea I had had no direction, but thanks for the help