更新时间:2022-12-10 07:51:39
P!{LoggedInUserAttribute_ClientID}
和 aname = ' Micro DPC'
和 SUBSTRING(条形码, 7 , 3 ) IN (' JAN',' FEB',' APR',' MAY',' JUN',' JUL',' AUG',
' SEP',' OCT',' NOV',' DEC')
order by right ( convert ( datetime ,' 15' + ' 条形码', 6 ), 5 )
P!{LoggedInUserAttribute_ClientID} and aname = 'Micro DPC' and SUBSTRING(barcode,7,3) IN ('JAN','FEB','APR','MAY','JUN','JUL','AUG', 'SEP','OCT','NOV','DEC') order by right(convert(datetime,'15' + 'barcode', 6),5)
更改
Change
right(convert(datetime,'15' + 'barcode', 6),5)
到
to
convert(datetime,'15' + right( 'barcode', 5),6)
这适用于SQL Server 2008
This is working in SQL Server 2008