troubleshooting Question

Error converting data type DBTYPE_DBTIMESTAMP to datetime

Avatar of proltdman
proltdman asked on
Microsoft SQL Server
13 Comments1 Solution4748 ViewsLast Modified:
Hi Experts,

I'm trying to do a distributed query within SQL Server 2000 (querying an Oracle db) to select candidate, candidate source and the date of the latest candidate source entry:


SELECT           MNME.NM_LTNM as candidate,
            LSRC.SR_DESC AS source,
            MAX(MSRCHIST.SRCH_DATE) AS [source date]

FROM         EZ..EZLIVE.MNME MNME INNER JOIN
           EZ..EZLIVE.MSRCHIST MSRCHIST ON MNME.NM_IDNO = MSRCHIST.SRCH_NM_NM INNER JOIN
           EZ..EZLIVE.LSRC LSRC ON MSRCHIST.SRCH_SOURCE_SR = LSRC.SR_IDNO

WHERE     (MNME.NM_RUPD >= CONVERT(DATETIME, '2005-08-22 00:00:00', 102))

GROUP BY MNME.NM_LTNM, LSRC.SR_DESC


I get the following error on the MAX(MSRCHIST.SRCH_DATE) AS [source date] line:
Error converting data type DBTYPE_DBTIMESTAMP to datetime.

Any help much appreciated!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros