- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
select trip_no,concat(CAST(trip_no &1024 aS bit),CAST(trip_no &512 aS bit),CAST(trip_no &256 aS bit), CAST(trip_no &128 aS bit),CAST(trip_no &64 aS bit),
cast(trip_no & 32 as bit)
, cast(trip_no & 16 as bit)
, cast(trip_no & 8 as bit)
, cast(trip_no & 4 as bit)
, cast(trip_no & 2 as bit)
,cast(trip_no & 1 as bit)) as trip_no_bit
from pass_in_trip
where trip_no<=2048 and trip_no>=1024
union
select trip_no,concat(CAST(trip_no &1024 aS bit),CAST(trip_no &512 aS bit),CAST(trip_no &256 aS bit), CAST(trip_no &128 aS bit),CAST(trip_no &64 aS bit),
cast(trip_no & 32 as bit)
, cast(trip_no & 16 as bit)
, cast(trip_no & 8 as bit)
, cast(trip_no & 4 as bit)
, cast(trip_no & 2 as bit)
,cast(trip_no & 1 as bit)) as trip_no_bit
from trip
where trip_no<=2048 and trip_no>=1024
union
Комментарии (0) RSS
Добавить комментарий