motioneye
asked on
sql query to reportserver table error
I have a query below which run fine except when I include the join to the sysjobs table, I just can't figure out why the query get error, anyone has ideas where and how to start troubleshooting ? Here is the error message return.
Msg 8169, Level 16, State 2, Line 17
Conversion failed when converting from a character string to uniqueidentifier.
SELECT
c.Name AS ReportName
, rs.ScheduleID AS JOB_NAME
, s.[Description]
, s.LastStatus
, s.LastRunTime
--,JBS.Name
--INTO drop table JOBS_Error
FROM
ReportServer..[Catalog] c
JOIN ReportServer..Subscription s s ON c.ItemID = s.Report_OID
JOIN ReportServer..ReportSchedu le rs ON c.ItemID = rs.ReportID
JOIN msdb..sysjobs jbs ON JBS.Name = rs.ScheduleID
AND rs.SubscriptionID = s.SubscriptionID
Msg 8169, Level 16, State 2, Line 17
Conversion failed when converting from a character string to uniqueidentifier.
SELECT
c.Name AS ReportName
, rs.ScheduleID AS JOB_NAME
, s.[Description]
, s.LastStatus
, s.LastRunTime
--,JBS.Name
--INTO drop table JOBS_Error
FROM
ReportServer..[Catalog] c
JOIN ReportServer..Subscription
JOIN ReportServer..ReportSchedu
JOIN msdb..sysjobs jbs ON JBS.Name = rs.ScheduleID
AND rs.SubscriptionID = s.SubscriptionID
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.
ASKER