我運行此命令:我如何縮短這個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