sQL HELP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • liliyan2007
    New Member
    • Feb 2008
    • 2

    sQL HELP

    I have a view like below generated from my time and attendance software.

    staffNo Emp Name title TranType Cdate time
    556 JOHN WEB DEVELOPER IN 24/01/2008 13:47:30
    556 JOHN WEB DEVELOPER OUT 24/01/2008 16:38:33
    556 JOHN WEB DEVELOPER OUT 24/01/2008 16:40:03
    556 JOHN WEB DEVELOPER IN 26/01/2008 10:05:39
    556 JOHN WEB DEVELOPER IN 26/01/2008 10:05:45
    556 JOHN WEB DEVELOPER OUT 26/01/2008 14:07:06
    556 JOHN WEB DEVELOPER OUT 27/01/2008 16:40:45

    Now i need to get this data like below.
    staffNo Emp Name title TranType Cdate time
    556 JOHN WEB DEVELOPER 24/01/2008 13:47:30 16:40:03
    556 JOHN WEB DEVELOPER 25/01/2008 NO RECS NO RECS
    556 JOHN WEB DEVELOPER 26/01/2008 10:05:39 14:07:06
    556 JOHN WEB DEVELOPER 27/01/2008 NO RECS 16:40:45

    Please helpme.I am not good in SQL
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Try to use CASE statement in your query .

    what bout that tran type ?

    Comment

    • liliyan2007
      New Member
      • Feb 2008
      • 2

      #3
      Thanks debasis.It is transaction type in or out

      Comment

      Working...