日期:2014-05-17  浏览次数:20821 次

出现这个错误是怎么回事
DECLARE
  V_SQL LONG;
  ---CURSOR V_CUR IS
  -- WHERE TABLE_NAME LIKE 'FEE%';
BEGIN

  FOR V_CUR IN (SELECT DISTINCT PROV_ID FROM CHECK_DIM_CITY) LOOP
  V_SQL := 'INSERT INTO ZB_XUE911 
 SELECT /*+ parallel(T,8)*/PROV_ID, SUBS_INSTANCE_ID, DEVICE_NUMBER, TOTAL_FEE_ALL 
 FROM ZB_DWA.DWA_V_M_CUS_MB_USER_EXT_'|| V_CUR.PROV_ID ||'@CUJFBD t
 WHERE t.MONTH_ID = ''201207'' 
 AND t.service_type =' 20AAAAAA '
 AND t.total_fee_all <0 
 AND ROWNUM<6 ';
 EXECUTE IMMEDIATE V_SQL;
  END LOOP;
  COMMIT;
END;



注:单引号 双引号 双单引号都用过 不行啊 求助 谢谢 
ORA-06550: 第 12 行, 第 24 列: 
PLS-00103: 出现符号 "20"在需要下列之一时:
 * & = - + ; < / > at in is
  mod remainder not rem <an exponent (**)> <> or != or ~= >= <=
  <> and or like LIKE2_ LIKE4_ LIKEC_ between || member
  SUBMULTISET_


------解决方案--------------------
SQL code

--兩個引號要放一起
 WHERE t.MONTH_ID = ''201207''  
 AND t.service_type =''20AAAAAA ''