Actual_results列中的数据:6 期望的输出:6%
步骤:
m.front().get_y()
如何添加'%'到ACTUAL_RESULTS?
我可以BEGIN
SELECT CYTOTOXICITY_PF,
CYTOTOXICITY_PER
INTO bio_test,
B_ACTUAL_RESULT
FROM src_material
WHERE study_id =V_ITEM_ID(i)
AND NEW_MAT_NUMBER=V_NEW_MAT_NUMBER(I);
b_test3:='CYTOTOXICITY';
EXCEPTION
WHEN TOO_MANY_ROWS THEN
INSERT
INTO TCE_DATA_ISSUES VALUES
(
V_ITEM_ID(i),
'CYTOTOXICITY',
V_NEW_MAT_NUMBER(I),
TRANS_NAME,
'TOO MANY ROWS'
);
bio_test :='';
B_ACTUAL_RESULT:='';
END;
ELSE
bio_test :=F_GET_TEST_VALUE(V_ITEM_ID(i),b_test3,V_NEW_MAT_NUMBER(I));
B_ACTUAL_RESULT:='';
END IF;
BEGIN
INSERT
INTO tce_test_result_form
(
UNQ_NUM,
MIG_STATUS,
ITEM_ID,
REV_ID,
FORM_NAME,
CREATION_DATE,
B4_TEST_NAME,
B4_ACTUAL_RESULT,
B4_PASS_FAIL,
B4_EXTRACTION_TEMPERATURE
)
VALUES
(
V_UNQ_NUM,
'CREATE',
V_ITEM_ID(i),
'A',
CASE b_test3
WHEN 'HEMOLYSIS_PF'
THEN V_ITEM_ID(i)
||'/A'
||'_Hemocompatibility - In Vitro Hemolysis Assay Indirect'
ELSE V_ITEM_ID(i)
||'/A'
||'_'
||b_test3
END,
V_CREATION_DATE(i),
CASE b_test3
WHEN 'HEMOLYSIS_PF'
THEN 'Hemocompatibility - In Vitro Hemolysis Assay Indirect'
ELSE B_TEST3
END,
NVL(B_ACTUAL_RESULT,'N/A'),
CASE
WHEN BIO_TEST IN('P','P')
THEN 'PASS'
WHEN BIO_TEST IN('f','F')
THEN 'FAIL'
ELSE 'NOT REQUIRED'
END,
B_EXTRACT_TEMPERATURE
);
吗?
(因为如果在实际结果中没有值,我被要求更新N / A)
答案 0 :(得分:0)
使用解码来区分N / A和其他结果
decode(V_ACTUAL_RESULT, 'N/A', 'N/A', V_ACTUAL_RESULT || '%')
答案 1 :(得分:0)
你可以这样做(如果V_ACTUAL_RESULT的声明列数据类型与CHAR兼容)
NVL2(V_ACTUAL_RESULT, V_ACTUAL_RESULT || '%', 'N/A');