存储过程--把查询出来的数据直接插入表

存储过程--把查询出来的数据直接插入表     

    sql_str := ' insert into  T_XS_SHOP(' || chr(10) ||
                 'SHOP_ID,' || chr(10) ||
                 'TITLE'  || chr(10) ||
                 ')' || chr(10) ||
                 '(' || chr(10) ||
                 'select shop_id,shop_name from T_Base_ShopPublic@yb' || ' where shop_id in (' || strSelectedShopID || ')' ||
                 ')' ;
                
     dbms_output.put_line(sql_str);
     execute immediate sql_str;

posted @ 2012-08-09 16:37  杨斌_济南  阅读(1968)  评论(0编辑  收藏  举报