Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

from dt column how to get the data into 2 separate columns as intime and outtime where inout column defines the dt either intime or outtime in sql server 2005

$
0
0

emp_ID card_ID dt inout desc

275144271992011-03-2321:25:57.0000 Successful 275144271992011-03-2321:26:04.0001 Successful275144271992011-03-2321:35:00.0001 Successful 270144277962011-03-2321:53:55.0001 Successful 270144277962011-03-2321:54:02.0000 Successful

I want the output like this:

empID   Card ID            dt              intime                  outtime275144271992011-03-232011-03-2321:25:57275144271992011-03-232011-03-2321:26:04275144271992011-03-232011-03-2321:35:00270144277962011-03-232011-03-2321:53:552011-03-2321:54:02


Viewing all articles
Browse latest Browse all 15889

Trending Articles



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