日期:2014-05-16  浏览次数:20482 次

Proc 正则问题
今天写一段代码非常奇怪.

这个样子居然编译不过
EXEC SQL
			select 'A'||LPAD(SUBSTR(max(MOBILE_MODEL),2)+1,4,'0') into :codeMobileModel.mobileModel
			 from ROUTER.CODE_MOBILE_MODEL where
			 regexp_like(mobile_model , "^A[0-9]{4}");


引用

PCC-S-02201, Encountered the symbol ";" when expecting one of the following:

   = * < > + - / ^= | != <= >= <> at, not, between, in, is,
   like, day, hour, minute, month, second, year,


被迫改成
EXEC SQL
			select 'A'||LPAD(SUBSTR(max(MOBILE_MODEL),2)+1,4,'0') into :codeMobileModel.mobileModel
			 from ROUTER.CODE_MOBILE_MODEL where
			 mobile_model like 'A___';

成功编译.

求解 中