Hi I have the following qry...
select tagname, start_swipe, end_swipe
from
(
select id, tagname, badge, CASE WHEn (ID % 2) <> 0
THEN datetime END as start_swipe,CASE WHEN (ID % 2) = 0
THEN datetime END as end_swipe
from badge_swipe_temp
) a
and it returns the following data...
badge start end
pack1_Dat_badge 10/5/2010 8:12 NULL
pack1_Dat_badge NULL 10/5/2010 8:45
pack1_Dat_badge 10/5/2010 9:46 NULL
pack1_Dat_badge NULL 10/5/2010 10:15
pack1_Dat_badge 10/5/2010 11:14 NULL
pack1_Dat_badge NULL 10/5/2010 11:44
pack1_Dat_badge 10/5/2010 12:45 NULL
pack1_Dat_badge NULL 10/5/2010 13:16
pack1_Dat_badge 10/5/2010 14:15 NULL
pack1_Dat_badge NULL 10/5/2010 14:45
I am trying to get the data returned like this...
badge start end
pack1_Dat_badge 10/5/2010 8:12 10/5/2010 8:45
pack1_Dat_badge 10/5/2010 9:46 10/5/2010 10:15
pack1_Dat_badge 10/5/2010 11:14 10/5/2010 11:44
pack1_Dat_badge 10/5/2010 12:45 10/5/2010 13:16
pack1_Dat_badge 10/5/2010 14:15 10/5/2010 14:45
could someone lead me in the right direction?
Thank You
select tagname, start_swipe, end_swipe
from
(
select id, tagname, badge, CASE WHEn (ID % 2) <> 0
THEN datetime END as start_swipe,CASE WHEN (ID % 2) = 0
THEN datetime END as end_swipe
from badge_swipe_temp
) a
and it returns the following data...
badge start end
pack1_Dat_badge 10/5/2010 8:12 NULL
pack1_Dat_badge NULL 10/5/2010 8:45
pack1_Dat_badge 10/5/2010 9:46 NULL
pack1_Dat_badge NULL 10/5/2010 10:15
pack1_Dat_badge 10/5/2010 11:14 NULL
pack1_Dat_badge NULL 10/5/2010 11:44
pack1_Dat_badge 10/5/2010 12:45 NULL
pack1_Dat_badge NULL 10/5/2010 13:16
pack1_Dat_badge 10/5/2010 14:15 NULL
pack1_Dat_badge NULL 10/5/2010 14:45
I am trying to get the data returned like this...
badge start end
pack1_Dat_badge 10/5/2010 8:12 10/5/2010 8:45
pack1_Dat_badge 10/5/2010 9:46 10/5/2010 10:15
pack1_Dat_badge 10/5/2010 11:14 10/5/2010 11:44
pack1_Dat_badge 10/5/2010 12:45 10/5/2010 13:16
pack1_Dat_badge 10/5/2010 14:15 10/5/2010 14:45
could someone lead me in the right direction?
Thank You