728x90
반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
SELECT
ATCH_FILE_ID,
FILE_CN,
FILE_SN,
FILE_STRE_COURS,
STRE_FILE_NM,
FILE_EXTSN,
ORIGNL_FILE_NM,
FILE_SIZE,
CASE
WHEN FILE_SIZE >= (CAST(1024 AS BIGINT) * 1024 * 1024 * 1024) THEN ROUND(FILE_SIZE / (CAST(1024 AS BIGINT) * 1024 * 1024 * 1024), 2) || ' TB'
WHEN FILE_SIZE >= (CAST(1024 AS BIGINT) * 1024 * 1024) THEN ROUND(FILE_SIZE / (CAST(1024 AS BIGINT) * 1024 * 1024), 2) || 'GB'
WHEN FILE_SIZE >= (CAST(1024 AS BIGINT) * 1024) THEN ROUND(FILE_SIZE / (CAST(1024 AS BIGINT) * 1024), 2) || ' MB'
WHEN FILE_SIZE >= (1024) THEN ROUND(FILE_SIZE / (1024), 2) || ' KB'
ELSE FILE_SIZE || ' byte'
END AS FILE_MG
FROM
COMTNFILEDETAIL
WHERE
ATCH_FILE_ID = 'FILE_000000000001232'
AND FILE_SN = '0'
|
cs |
728x90
반응형