Aleks
asked on
Problem running sql query on sql express
I am running a query on a few servers, it works fine on all SQL 2008 R2 and up. But when I ran it on an SQL Express 2005 I got an error.
This is the query:
SELECT ExpiresOn as originalValue,
CONVERT(VARCHAR(25), CONVERT(DATE, ExpiresOn), 101) as newValue
FROM Users
WHERE ISDATE(ExpiresOn) = 1
This is the error:
Type DATE is not a defined system type
Is there a way to tweak the sql above so it works on 2005 ? Meantime Ill advice my client to update their SQL.
This is the query:
SELECT ExpiresOn as originalValue,
CONVERT(VARCHAR(25), CONVERT(DATE, ExpiresOn), 101) as newValue
FROM Users
WHERE ISDATE(ExpiresOn) = 1
This is the error:
Type DATE is not a defined system type
Is there a way to tweak the sql above so it works on 2005 ? Meantime Ill advice my client to update their SQL.
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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks everyone !
ASKER
I heard it also doesn't work on 2012 ? Is this true ?