Jason-299789 (6/20/2013)
ashwinboinala (6/20/2013)
i am getting this value from sysjobhistroy table from msdb there its in int format if u can give me solution where i can filter that table thats fineWouldnt the LastRunDate be NULL if the job has never been run? which is where you problem maybe.
As a test wrap an ISNULL around the LASTRUNDATE field and set it to 1 then run the query.
Converting NULL values won't fail. There must be non-null int values that are not convertible.