The following code will create a stored procedure on your SQL server for the SEPM database. This stored procedure excepts a single value in the form of a computer name. The ComputerName parameter is currently set to varchar(25) even though, as you probably already know, windows limits computer names to 15 characters.
Make sure you are set to use the SEPM DB and execute the following code:
CREATE PROCEDURE GetScanTime
--//* Create a parameter for user to enter computer name *\\
--//* Do not return row count * \\
SET NOCOUNT ON;
--//* t1=dbo.scans, t2=dbo.sem_computer *\\
t1.startdatetime AS 'Date',
t2.computer_name AS 'Computer Name',
t1.duration AS 'Scan Duration (in seconds)'...