摘要:
1:模拟一张表来查询日期范围的连续性create table myrecords( id number, start_date number, --开始时间 end_date number --结束时间);insert into myrecords values (1,20100101,20101231);insert into myrecords values (1,20100101,20110231);insert into myrecords values (1,20100202,20100303);insert into myrecords values (2,20100101,20. 阅读全文
摘要:
今天看到qq群里有人在用sql写日历,自己也写了个,作下记录;create or replace procedure get_Calender(choosedate in date) is/* 功能: 根据入参日期打印当月的日历(星期天在第一天)*/ cursor cur_Calender is select nvl(max(decode(wk, 1, calender, null)), '--') as "SUN", nvl(max(decode(wk, 2, calender, null)), '--') as "MON&quo 阅读全文