C/C++教程

5.0 oracle序列

本文主要是介绍5.0 oracle序列,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

createsequenceSEQ_WSGW_LOG

minvalue 1 maxvalue 99999999999999 start with 81 increment by 1 cache 20;   -- Create sequence create sequence SEQ_M_T_TERMINAL_CHECK_LOST1 minvalue 1 maxvalue 999999999 start with 1115 increment by 1 cache 2;    
---1用户绑定总数 select count(*) From c_cons_bunding c where c.bund_status='1'   ---2各地市公司绑定数 select c.org_no, (select o.org_name from o_org o where o.org_no = c.org_no) org_name, c.shu_liang From (select substr(c.org_no, 0, 5) org_no, count(*) shu_liang From c_cons_bunding c where c.bund_status='1' group by (substr(c.org_no, 0, 5))) c   --2.5各县绑定查询 select c.org_no, (select o.org_name from o_org o where o.org_no = c.org_no) org_name, c.shu_liang From ( select substr(c.org_no, 0, 7) org_no, count(*) shu_liang From c_cons_bunding c where c.bund_status='1' group by (substr(c.org_no, 0, 7)) ) c   --2.6各乡镇绑定查询 select c.org_no, (select o.org_name from o_org o where o.org_no = c.org_no) org_name, c.shu_liang From ( select substr(c.org_no, 0, 9) org_no, count(*) shu_liang From c_cons_bunding c where c.bund_status='1' group by (substr(c.org_no, 0, 9)) ) c   --积分 select c.*, (select distinct i.staff_name from c_deptemp_info i where c.erp_no = i.erp_no) orgname From c_extender_arrange c order by c.all_integral desc;   --3问题清单 select (select distinct(b.ORG_NO) from c_cons_bunding b where b.weichat_id = c.weichat_id and b.is_default = '1') org_no,   (select o.org_name From o_org o where o.org_no=(select distinct(b.ORG_NO) from c_cons_bunding b where b.weichat_id = c.weichat_id and b.is_default = '1') ),   (select distinct(b.cons_no) from c_cons_bunding b where b.weichat_id = c.weichat_id and b.is_default = '1') cons_no,   (select s.cons_name From c_cons s where s.cons_no=(select distinct(b.cons_no) from c_cons_bunding b where b.weichat_id = c.weichat_id and b.is_default = '1') ), c.tel, c.weichat_id, c.remark, c.stat_date From c_weichat_wkst c where c.app_busy_type_code = '900' and to_char(c.stat_date,'yyyy/MM/dd HH24')>='2019/09/18 14' order by c.stat_date desc --4各地市问题数量 select b.org_no, (select o.org_name from o_org o where o.org_no = b.org_no) org_name, b.shu_liang From (select substr(c.org_no, 0, 5) org_no, count(*) shu_liang From (select (select distinct(b.ORG_NO) from c_cons_bunding b where b.weichat_id = c.weichat_id and b.is_default = '1') org_no, c.weichat_id, c.remark, c.stat_date From c_weichat_wkst c where c.app_busy_type_code = '900') c group by (substr(c.org_no, 0, 5))) b     ---5地市当日 select c.org_no, (select o.org_name from o_org o where o.org_no = c.org_no) org_name, c.shu_liang From (select substr(c.org_no, 0, 5) org_no, count(*) shu_liang From c_cons_bunding c where trunc(c.bound_update_time) = trunc(sysdate) and c.bund_status='1' group by (substr(c.org_no, 0, 5))) c   --- 吴忠 select (select b.ORG_NO from c_cons_bunding b where b.weichat_id = c.weichat_id and b.is_default = '1') org_no, c.weichat_id, c.cons_no, c.cons_name, c.remark, c.stat_date, c.tel From c_weichat_wkst c where c.app_busy_type_code = '900' and c.weichat_id in (select b.weichat_id from c_cons_bunding b where b.weichat_id = c.weichat_id and b.ORG_NO like '64401%')           --6绑定存在问题   select c.weichat_id,count(*) From c_cons_bunding c where c.is_default='1' group by c.weichat_id having(count(*))>1   --oQDCUwoFXkXGilEvk33boQZx2yfU --oQDCUwvIQRjtG46tZ1oMB1Rs-txo --oQDCUwkxmLt2k7YdaeCrYxFWUHe4 --oQDCUwivlh-bd5PIlQ_6GSIj0TF4     SELECT B.MAPP_NO \"微应用编号\","+ "B.MAPP_NAME \"微应用名称\","+ "A.STAT_CYC \"统计周期\","+ "A.TERMINAL_TYPE \"设备类型\","+ "A.TERMINAL_MODEL \"设备型号\","+ "A.INST_TMNNUM \"安装设备数\","+ "A.AC_INST_TMNNUM \"安装设备总数\" "+       张军囍 http://172.16.3.58/WEIAPPMANGER yxsuperadmin Yth2019!123,./+   张军喜 09:36:04 交费成功、下装成功、下装失败五分钟推送一次数据   停电信息五分钟推送一次数据   用户余额不足,1天推送   用户余额不足,1天推送一次,时间每天早晨8点20分抽取数据   电费账单,每月27日下午4点推送数据   ----消息类型:01 交费成功 02 下装成功 03 下装失败 04 余额不足 05 电费账单 select *From Y_MESSAGE_SUB;   select c.cons_no,c.cons_name,c.start_time,c.stop_date From c_region_outage c,y_message_sub y order by c.update_date desc select *From c_pay_notice c where c.notice_type='04' and trunc(c.update_date)=trunc(sysdate); select *From c_pay_notice c where c.notice_type='05' and to_char(c.stat_date,'yyyymm')=to_char(add_months(sysdate,-1),'yyyymm')     数据库24小时标准写法 to_char(c.start_time,'yyyy-MM-dd HH24:MI:ss'),   java 多种 formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");   --oracle select count(*) from v$session; select count(*) from v$session where status = 'ACTIVE'; select username, count(username) from v$session where username is not null group by username;   生产户号 用户/密码 1010062200/062200   00065201004|WXGZH1|20190904091447|1567559687335514|1016452500||||   2019000000430009 2017000000430009 select *from c_electronic_invoice c where c.inv_id='2019000000430009' for update;   chown -R 775 app/     {"accessList":[{value=1, key=20190906/monthBill/MonthBillController/getMonthBill}]}     http://127.0.0.1:8020/wechat/app-download/app-menu.html         ---月度账单 select *From c_cons_bunding c where c.weichat_id='o00uR0fv5M3332bWqh38S4268G-c' for update; select *From c_cons_bunding c where c.Cons_No='1016452500' for update;     --月度账单 4012740695 --getMonthBill [201901, 201912, 1016506959] select t.stat_ym, t.all_quantity, t.all_elec_charge, t.level_num from C_MONTH_ACCOUNT t where t.stat_ym >= '201901' and t.stat_ym <= '201912' and t.cons_no = '1016506959' order by t.stat_ym asc   --getYearBill [1016506959, 201901, 201912] select sum(t.all_quantity), sum(t.all_elec_charge) from C_MONTH_ACCOUNT t where t.cons_no = '1016506959' and t.stat_ym >= '201901' and t.stat_ym <= '201912'   --CONS_SORT_CODE 1016506959 测试 select t.CONS_SORT_CODE from c_cons t where t.cons_no='1016506959' select *from c_month_account   ---判断居民月份的阶梯 select c.stat_ym,c.cons_no,c.level_num from c_month_account_detail c where c.cons_no = '1016506959' and c.stat_ym >= '201901' and c.stat_ym <= '201912' order by c.stat_ym asc   ----账单详情 实时电量 [1016506959, Mon Apr 01 00:00:00 CST 2019, Tue Apr 30 00:00:00 CST 2019] select to_char(t.STAT_DATE, 'yyyy-MM-dd') STAT_DATE, t.ALL_QUANTITY, t.PEAK_QUANTITY, t.FLOAT_QUANTITY, t.VALLY_QUANTITY, a.TS_FLAG from C_REAL_QUANTITY_04 t, c_cons a where t.CONS_NO = '1016506959' And to_char(t.STAT_DATE,'yyyy/MM/dd') >= '2019/04/01' And to_char(t.STAT_DATE,'yyyy/MM/dd') <= '2019/04/30' and t.CONS_NO = a.CONS_NO order by t.STAT_DATE desc     ---判断居民月份的阶梯 select c.c_id,c.stat_ym,c.cons_no,c.level_num,c.ts_flag from c_month_account_detail c where c.cons_no = '1016506959' and c.stat_ym >= '201901' and c.stat_ym <= '201912' order by c.stat_ym asc ----电子发票 --查询列表 /monthBill/electronic-invoice/sgpmsQueryMetdataDz --接口查询 营销 SELECT A.RCVBL_ID, A.CONS_NO, SUBSTR(A.ORG_NO, 0, 5) from a_Prctax_Amt A where a.cons_no = '1016452500' and a.INV_BUSI_TYPE = '01' AND A.TOTAL_AMT >= 0 AND RCVBL_YM like '2019%' ---- SELECT DISTINCT A.INV_APP_NO, A.INV_ID, A.INV_TYPE, NVL((SELECT DECODE(D.SETTLE_FLAG, '03', '1', '0') FROM A_RCVBL_FLOW D WHERE D.RCVBL_AMT_ID = C.RCVBL_ID AND ROWNUM = 1), '0') SETTLE_FLAG, A.INV_STATUS, A.NO_TAX_AMT, A.TOTAL_AMT, D.COMMODITY_NUM, C.RCVBL_YM, C.CONS_NO, C.PRC_TAX_AMT_ID FROM A_INV_METADATA A,A_INV_RELA B ,A_PRCTAX_AMT C,A_INV_METADATA_DET D WHERE C.PRC_TAX_AMT_ID = B.PRC_TAX_AMT_ID AND B.INV_ID= A.INV_ID AND A.INV_ID= D.INV_ID AND C.INV_BUSI_TYPE = '01' AND C.RCVBL_YM like '2019%' AND C.CONS_NO = '1016452500' ORDER BY C.RCVBL_YM DESC     select *From A_INV_RELA where PRC_TAX_AMT_ID='2019000000878009' --2019000001278100 2019000001218020 select inv_status From A_INV_METADATA where INV_ID='2019000001278100' for update; ---停电公告 select *from c_elec_addr_det c where name ='宁夏回族自治区' select *from c_elec_addr_det c where c.code_type<='4' and c.p_code='99999' for update; select *from c_elec_addr_det c where c.code_type<='4' and c.p_code='640000' for update; select *From s_region_outage s where to_char(s.start_time,'yyyy/MM/dd')<'2019/10/04' and to_char(s.stop_date,'yyyy/MM/dd')>='2019/09/26'       -------所在区县 单位 select * code_type from c_elec_addr_det c where c.code_type<'4' and c.p_code='999999' select * code_type from c_elec_addr_det c where c.code_type<'4' and c.p_code='640000' select * code_type from c_elec_addr_det c where c.p_code='640100' select count(*) from c_elec_addr_det select * from c_elec_addr_det c where c.code_type like '0_' select distinct code_type from c_elec_addr_det   --56750 update c_elec_addr_det c set c.code_type= '0'||c.code_type -- where c.code_type<'4' and c.p_code='640000'       https://qidd.cn/wechat/promoter/promoter.html?userId=o00uR0YCPjY67zhzA1MJ_GmeXWnE&from=singlemessage 推广员申请传参 {"data":{"registerType":"01","weichatId":"o00uR0YCPjY67zhzA1MJ_GmeXWnE","employeeNo":"18152319606","orgNo":null,"proName":"郑亮","certNum":"18152319606","littleCorePic":null},"serviceCode":"gghProApp"} 推广员信息表 select *from C_DEPTEMP_INFO c where c.c_id<4 //员工信息表 select *From C_EXTENDER_APP //推广员信息表 select *From C_WORK_PRODUCT //积分信息表 select *From C_EXTENDER_ARRANGE; //积分排名表 select max(to_number(c_id)) from c_deptemp_info order by c_id desc;
这篇关于5.0 oracle序列的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!