HI I am looking for some help I just can't seem to get my head how self joins work. I have this sql code
select Persno'Name',convert(char(20), A_Date , 13)'Logins',acode
from atrail as LOGIN
where acode = 'LOGIN' OR acode = 'LOGOUT'
order by a_date desc
Which produces a list of User names and when the have logged in and out. What I am trying to acheive is to get anther column with the LOGOUT date next to the date they logged in date so that it is easyer to see when they logged in and out.
Thanks
Andy