我运行此命令:我如何缩短这个SQL?
select * from LIST where JCODE = 8 and
KCODE = 01 and LCODE = 2011
和如果上述retruns没有行然后执行以下:
insert into LIST
select * from [email protected] where JCODE = 8 and
KCODE = 01 and LCODE = 2011 and ban
in (select BAN from billing_account)
Update LIST set STS = null where JCODE = 8
AND KCODE = 01;
Update LIST set NO = '1' where JCODE = 8 AND
KCODE = 01;
而且我可以使用一些变量在begininng其中 套
JCODE= somevalue
KCODE= anothervalue
LCODE=someothervalue
让我没有我每次运行它来编辑每一行。 我使用:
Oracle 9i Enterprise Edition release 9.2.8.0 - 64 bit Production
COUNT()可以在Oracle中通配符和字段名被使用,因此你的猜测是正确的:) – GuZzie 2012-03-15 10:24:16
我已经在两个数据库有LIST,我需要的coresponding值从LNDB数据库复制如果列表表我的数据库是空的。那就是为什么我用LIST @ LNDB使用select。 – munish 2012-03-15 10:26:48
那么是否有一个原因,你不会简单地将你的整个LIST @ LNDB转储到这个DB的列表中? – 2012-03-15 10:31:05