Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Help with a Query

$
0
0

Hi 

I have data in the table as follows.

CREATE TABLE #Executions
( EventIDINT IDENTITY(1,1),
  EventTimeStamp DATETIME,
  EventName      VARCHAR(MAX),
  EventStatus    VARCHAR(MAX) )

INSERT INTO #Executions(EventTimeStamp,EventName,EventStatus)
SELECT '2014-06-24 19:50:16.370','ACH_FILE','About to begin SSIS package execution' UNION ALL
SELECT '2014-06-24 19:50:18.247','ACH_FILE','Completed SSIS package execution' UNION ALL
SELECT '2014-06-26 19:55:32.840','ACH_FILE','About to begin SSIS package execution'  UNION ALL
SELECT '2014-06-26 19:55:34.807','ACH_FILE','Completed SSIS package execution'  UNION ALL
SELECT '2014-06-25 19:40:40.647','ACH_FILE','About to begin SSIS package execution'  UNION ALL
SELECT '2014-06-25 19:40:42.523','ACH_FILE','Completed SSIS package execution'

I Want output as 

EvenNameEventStartEventEndTimeTookTorun

ACHFile 2014-06-24 19:50:16.370      2014-06-24 19:50:18.2471.877

ACHFile 2014-06-26 19:55:32.8402014-06-26 19:55:34.8071.967

Thanks in Advance....


Rohan


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>