一个动态创建表的问题~

kingzhang 2007-08-24 02:42:57
TableName := 'n01_SH_sp'+Str_locIP ;
Str_Cre := 'Create Table '+TableName+' As '+
'select n0100,n0101,a2102,n0103,n0102,c0103,c0104,n0104,n0105,a2118 from n01,a21,c01 '+
'where n0101>=:rq1 and n0101<=:rq2 and c0101=n0102 and a2118=n0100 ';
请问应该怎么做~谢谢~
...全文
127 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
oraclelogan 2008-06-26
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 mantisXF 的回复:]
TableName   :=   'n01_SH_sp '||Str_locIP   ;
Str_Cre   :=   'Create   Table   '||TableName|| '   As   '|| 'select   n0100,n0101,a2102,n0103,n0102,c0103,c0104,n0104,n0105,a2118   from   n01,a21,c01   '|| 'where   n0101> =:rq1   and   n0101 <=:rq2   and   c0101=n0102   and   a2118=n0100   ';
execute   immediate   Str_Cre;
[/Quote]

学习啦,不错。
mantisXF 2007-08-24
  • 打赏
  • 举报
回复
TableName := 'n01_SH_sp'||Str_locIP ;
Str_Cre := 'Create Table '||TableName||' As '||'select n0100,n0101,a2102,n0103,n0102,c0103,c0104,n0104,n0105,a2118 from n01,a21,c01 '||'where n0101>=:rq1 and n0101<=:rq2 and c0101=n0102 and a2118=n0100 ';
execute immediate Str_Cre;
kingzhang 2007-08-24
  • 打赏
  • 举报
回复
急,在线等~

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧