ORACLE

记录一下TIPTOP

#1
回复 yaner 2015-01-09, 9:26 PM
select ima01,ima02,ima021 from ima_file where ima01 like '9F%'
#2
回复 yaner 2015-01-10, 2:38 PM
update sfb_file set sfb94 ='N' where sfb01 like 'B7999%'
#3
回复 yaner 2015-01-10, 2:39 PM
delete from sfb_file where sfb01 like 'B7999%'
#4
回复 yaner 2015-01-10, 5:56 PM
select * from hw01.img_file where img18 = to_date('1999/12/31','YYYY/mm/dd')

select * from hy01.img_file where img18 = to_date('1999/12/31','YYYY/mm/dd')

select * from sl01.img_file where img18 = to_date('1999/12/31','YYYY/mm/dd')

update sl01.img_file set img18 = to_date('9999/12/31','YYYY/mm/dd') where img18 = to_date('1999/12/31','YYYY/mm/dd')
#5
回复 yaner 2015-01-10, 6:19 PM
update gen_file set gen02='严芙蓉' where gen02 like '小红帽'

select gen02 from gen_file where gen02='严芙蓉'
#6
回复 yaner 2015-01-10, 6:41 PM
update ecm_file set ecm62 ='1'
#7
回复 yaner 2015-01-10, 6:54 PM
update ecm_file set ecm65 ='2000' where ecm01='B5111-1501060009'  

update ecm_file set ecm301='2000' where ecm01 = 'B5111-1501060009' and ecm03='10'
#8
回复 yaner 2015-01-11, 8:57 PM
select sfv01 as "入库单号",sfv11 as "工单号",sfv17 as "FQC单号",sfv04 as "原件料号",sfv07 as "批次号" from sfv_file where sfv11 like 'C5111%'
#9
回复 yaner 2015-01-12, 4:50 PM
select ecb01,ecb17,ecb40 from sl01.ecb_file where ecb01 like '25%' and ecb40 = 'Y'

update ecb_file set ecb40 = 'N' where ecb01 like '25%' and ecb40 = 'Y'

create table ecb_file_bak as select * from sl01.ecb_file as of timestamp sysdate -10/1440 where ecb01 like '25%' and ecb40 = 'Y'

select * from ecb_file_bak

merge into ecb_file p using ecb_file_bak q
on (p.ECB01=q.ecb01 and p.ecb02=q.ecb02 and p.ecb03=q.ecb03 and p.ecb012 = q.ecb012)
when matched then
update set p.ecb40 = q.ecb40

drop table ecb_file_bak

select * from ecm_file where ecm53 ='Y'

update ecm_file set ecm53 = 'N' where ecm53 ='Y'



select * from ecm_file where ecm66='Y'
#10
回复 yaner 2015-01-13, 7:38 PM
select oeb03,oeb04,ima02,ima021 from oeb_file,ima_file where oeb03='1' and oeb01='A1999-1412000001' and oeb04=ima01
#11
回复 yaner 2015-01-15, 12:10 PM
select * from sfb_file where sfb93='Y' and sfb05 like '25%' and sfb071< to_date('2015/01/08','YYYY/mm/dd')
#12
回复 yaner 2015-01-15, 1:11 PM
select sfb01,sfb05,sfb93,sfb071 from sfb_file where sfb93='Y' and sfb05 like '25%' and sfb071< to_date('2015/01/08','YYYY/mm/dd')

update sfb_file set sfb93='N' where sfb93='Y' and sfb05 like '25%' and sfb071< to_date('2015/01/08','YYYY/mm/dd')
#13
回复 yaner 2015-01-16, 10:18 AM
select bma01,ima02,bmb03 from bma_file,ima_file,bmb_file where bma01 like '20%' and bma01=bmb01 and bma01=ima01 and bmb02='10'
#14
回复 yaner 2015-01-16, 11:25 AM
select bma01, ima02, bmb03
  from bma_file, ima_file, bmb_file
where bma01 like '20%'
   and bma01 = bmb01
   and bma01 = ima01
   and bmb02 = (select min(bmb02) from bmb_file where bmb01 = bma01) --min最小值
#15
回复 yaner 2015-01-16, 5:10 PM
select * from ecm_file a where ecm03 =(select Max(ecm03) from ecm_file b where b.ecm01 = a.ecm01) and ecm66 ='Y'
Total: 34123Next ›
发表评论