select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} and (ctn_no is null or ctn_no != 'Y')
select top 1 * from asr_wrk_mast where source_loc_no = #{sourceLocNo} or loc_no = #{sourceLocNo}
select * from asr_wrk_mast where ((wrk_sts = 4 Or wrk_sts = 14 ) and io_type != 103 and io_type != 104 and io_type != 107 ) or (wrk_sts = 2 and io_type=6) order by upd_mk,io_time,wrk_no
select * from asr_wrk_mast
where wrk_sts=5
or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp))
or (wrk_sts=15 and dateadd(mi,15,crn_end_time) <= getdate() and wrk_no not in (select wrk_no from asr_bas_devp))
or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp))
order by io_time,wrk_no asc
select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and barcode=#{barcode} and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC
select top 1 * from asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=1 and (io_type=1 or io_type=10) order by io_pri desc,io_time,wrk_no ASC
select top 1 * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
select * from dbo.asr_wrk_mast where wrk_sts=2 and crn_no=#{crnNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC
select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo}
select top 1 * from dbo.asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no=#{sheetNo}
select top 1 * from dbo.asr_wrk_mast where sta_no=#{staNo} and wrk_sts = 14 and io_type>100 and sheet_no!=#{sheetNo}
select top 1 * from asr_wrk_mast where barcode=#{barcode} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)
select top 1 * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=12 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC
select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=2 and io_type=10
select top 1 * from dbo.asr_wrk_mast where wrk_sts=11 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no
select top 1 * from dbo.asr_wrk_mast where wrk_sts=12 and io_type=11 and crn_no=#{crnNo} order by io_time,wrk_no
select top 1 * from dbo.asr_wrk_mast where 1=1 and (wrk_sts=3 or wrk_sts=12) and crn_no=#{crnNo} order by io_time,wrk_no
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (3,4,11,12) and crn_no=#{crnNo} order by io_time,wrk_no
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts=2 and crn_no=#{crnNo} order by io_time,wrk_no
select * from dbo.asr_wrk_mast where 1=1 and wrk_sts = 14 and io_type in (103,104,107)
select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and source_sta_no=#{sourceStaNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
select * from dbo.asr_wrk_mast where crn_no=#{crnNo} and wrk_sts=11 and io_type>100 order by io_pri desc,io_time,wrk_no asc
select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4) and io_type != 11 and source_sta_no = #{sourceStaNo} order by io_time,wrk_no
select top 1 *
from dbo.asr_wrk_mast
where (wrk_sts in (11,12)
or (wrk_sts in (14,15) and wrk_no in
(
select wrk_no
from asr_bas_devp
where wrk_no > 0)
))
and io_type != 11
and source_sta_no = #{sourceStaNo}
order by io_time,wrk_no
select top 1 * from dbo.asr_wrk_mast where io_type = 110 and sta_no = #{staNo} order by io_time,wrk_no
SELECT COUNT(*) FROM dbo.asr_wrk_mast Where io_type = 10 and wrk_sts in (1,2,3)
select * from dbo.asr_wrk_mast
where rgv_no=#{rgvNo} and rgv_ssta_no in
#{item}
and wrk_sts=2 and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57)
order by io_pri desc,io_time,wrk_no asc
select * from dbo.asr_wrk_mast where rgv_dsta_no=#{rgvInDStn} and wrk_sts=7 and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time desc,wrk_no ASC
select * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (6,7) and rgv_no=#{rgvNo} order by io_time,wrk_no
select * from dbo.asr_wrk_mast where rgv_dsta_no=#{rgvOutDStn} and wrk_sts=17 and io_type > 100 order by io_pri desc,io_time desc,wrk_no ASC
select * from dbo.asr_wrk_mast where rgv_dsta_no=#{rgvDestStn} and wrk_sts in (7,17) order by io_pri desc,io_time desc,wrk_no ASC
select * from dbo.asr_wrk_mast
where rgv_no=#{rgvNo} and rgv_ssta_no in
#{item}
and wrk_sts=14 and io_type>100 and online_yn='N'
order by io_pri desc,io_time,wrk_no asc
select * from dbo.asr_wrk_mast where 1=1 and wrk_sts in (16,17) and rgv_no=#{rgvNo} order by io_time,wrk_no
select * from dbo.asr_wrk_mast
where 1=1
and wrk_sts in (2,14)
and rgv_no is null
select * from dbo.asr_wrk_mast
where 1=1
and wrk_sts in (2,14)
and (rgv_no IS NULL OR rgv_no = 0)
select * from dbo.asr_wrk_mast_rgv
where 1=1
and wrk_sts < 110
and rgv_no = #{rgvNo}
select * from dbo.asr_wrk_mast_rgv
where 1=1
and wrk_no = #{wrkNo}
INSERT INTO dbo.asr_wrk_mast_rgv SELECT * FROM asr_wrk_mast WHERE wrk_no = #{wrkNo}
update asr_wrk_mast_rgv
set wrk_sts=100
where 1=1
and wrk_no = #{wrkNo}
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =12 and wrk_no=#{wrkNo} and rgv_no is null
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =24 and wrk_no=#{wrkNo} and rgv_no is null
select * from dbo.asr_wrk_mast
where 1=1
and wrk_sts in (2,4,23,25)
and rgv_no = #{rgvNo}
order by io_pri desc,io_time desc,wrk_no ASC
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =14 and rgv_no=#{rgvNo}
order by rgv_dsta_no
order by rgv_dsta_no desc
select top 1 * from dbo.asr_wrk_mast where 1=1 and wrk_sts =24 and rgv_no=#{rgvNo}
order by rgv_dsta_no
order by rgv_dsta_no desc
SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =51 and source_sta_no = #{sourceStaNo}
SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =52 and source_sta_no = #{sourceStaNo}
SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=1 and wrk_sts =2 and sheet_no='4' and source_sta_no = #{sourceStaNo}
SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=202 and wrk_sts =54
SELECT top 1 * FROM dbo.asr_wrk_mast Where 1=1 and io_type=212 and sta_no =212