存储过程select @day CONVERT varchar 50 convert datetime @mzdate 23 select @nt COUNT 1 from trainFullIndex where mzdate like ""+@day+"%" and addr @addr declare @xuhaocode varchar 10 set @xuhaocode "0"+CONVERT varchar 10 @nt set @xuhaocode RIGHT @xuhaocode 2 "