LOCATE(X'0A', Fst_name)>0LOCATE(X'0A',work_ph_num)>0這個(gè)函數(shù)用于避免數(shù)據(jù)錯(cuò)行的條件判斷這里的LOCATE函數(shù)貌似不是一般用法,因?yàn)镕IRSTNAME和WORK PHONE都不可能出現(xiàn)"X'0A'"這樣的字段。這是什么用法?怎么用,請(qǐng)高手指點(diǎn)??梢缘脑?,留個(gè)QQ就更好啦~貼一段代碼看看:CASEWHEN LOCATE(X'0A', A.MAIN_PH_NUM)>0THEN SUBSTR(A.MAIN_PH_NUM, 1,LOCATE(X'0A',A.MAIN_PH_NUM)-1)ELSE A.MAIN_PH_NUMEND AS ACCT_TEL_NOFROM ADBCN.ACCT_ON_PAGE_CN A
請(qǐng)問在SQL中的LOCATE函數(shù)問題,麻煩幫忙看一下!
Cats萌萌
2021-11-24 19:15:29