Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Problem in Query - Failed to convert Date/time

Author  Topic 

eduardojel
Starting Member

1 Post

Posted - 2010-08-10 : 16:18:53
Hi guys;

I need your help, to solve a litle problem in query. I need get informations between 2 tables. When i make inner join of the tables, i receive the error messages : "Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string."


I tried to apply date functions, but did not work.

My query is :

SELECT v_R_System.Name0 AS Hostname, v_R_System.Resource_Domain_OR_Workgr0 AS Domain, v_R_System.Client0 AS [Status Agent],
v_R_System.AD_Site_Name0 AS [A.D Site], v_ClientHealthState.AssignedSiteCode AS [Site Code],
v_ClientHealthState.LastHealthReportDate AS [Last Health Agent]
FROM v_R_System INNER JOIN
v_ClientHealthState ON v_R_System.Name0 = v_ClientHealthState.AssignedSiteCode AND v_R_System.Name0 = v_ClientHealthState.LastHealthReportDate
WHERE (v_R_System.Client0 LIKE 1)
ORDER BY [A.D Site]


If someone can help me solve this problem. Thank you.

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-08-10 : 16:23:53
This doesn't look right.
v_R_System.Name0 = v_ClientHealthState.LastHealthReportDate

You also have the same field joined to v_ClientHealthState.AssignedSiteCode
Go to Top of Page
   

- Advertisement -