當DB欄位值為{null}→RIDE抓到字串None
當DB欄位值為空白→RIDE抓到0字元的空字串
Web上 欄位值為空白→RIDE抓到1字元的空字串
為了讓DB與Web可進行比對
衍生了↓這種作法
select std_value_desc, item_desc,loinc_code from Basic_CheckItem where id ='20752a3f-f795-465c-9f1f-79692df83ef1'
SELECT (CASE WHEN std_value_desc IS NULL THEN 0 ELSE std_value_desc END) std_value_desc,--{null}→1 (CASE WHEN item_desc IS NULL THEN 0 ELSE item_desc END) item_desc, -- →0 (CASE WHEN loinc_code IS NULL THEN 0 ELSE loinc_code END) loinc_code FROM Basic_CheckItem where id ='20752a3f-f795-465c-9f1f-79692df83ef1'
沒有留言:
張貼留言