SELECT po.po_number .... SOME QUERY
WHERE po.po_number not like '%[^0-9]%' AND (mai.removed = 0)
ORDER BY mai.unique_issue_id
这里我得到的输出是10位数字值,但我想要10位数字和8位数字,请建议。
答案 0 :(得分:1)
在SQL Server上,只需将数据CAST或CONVERT到您想要的输出类型:
SELECT
CONVERT(NUMERIC(10,0), po.po_number) AS [Number10d],
CONVERT(NUMERIC(8,0), po.po_number) AS [Number8d]
...