日期:2014-05-18 浏览次数:20448 次
CREATE PROCEDURE GET_T_STAFF @_StaffCode as INT AS BEGIN declare @_sql as varchar(800) set @_sql = 'select' set @_sql = @_sql + ' StaffCode , LoginPw , StaffName , Sex , IDCode , GraduateSchool , EntryDate , IfStop FROM dbo.T_Staff WHERE 1 = 1 ' if @_StaffCode >=1 set @_sql=@_sql + ' and StaffCode = ' + ltrim(@_StaffCode) print @_sql end