- 浏览: 17633 次
- 性别:
- 来自: 深圳
最新评论
文章列表
--这个算法得以实现,主要得到 newkid 和 nyfor 两位大哥的帮助
declare
type test_t is table of vw_money%rowtype index by binary_integer;
res test_t;
l_row binary_integer:=1;
sums number;
cal varchar2(1000);
seq varchar2(1000);
j NUMBER;
lv_result NUMBER;
lv_target NUMBER := 10; --- 目标
...
- 2009-09-03 23:45
- 浏览 801
- 评论(0)
--续前面的博客内容
declare
type test_t is table of vw_money%rowtype index by binary_integer;
res test_t;
l_row binary_integer:=1;
sums number;
cal varchar2(1000);
seq varchar2(1000);
j NUMBER;
lv_result NUMBER;
lv_target NUMBER := 10; --- 目标
lv_diff NUMBER := 1; - ...
- 2009-09-03 22:48
- 浏览 716
- 评论(0)
求最接近的解:
declare
type test_t is table of vw_money%rowtype index by binary_integer;
res test_t;
l_row binary_integer:=1;
sums number;
cal varchar2(1000);
seq varchar2(1000);
j NUMBER;
lv_result NUMBER;
lv_target NUMBER := 33;
lv_cal VARCHAR2(1000);
lv_seq VARCHAR2(1000) ...
- 2009-09-01 23:39
- 浏览 868
- 评论(0)
以下两个算法均是为了解决我前篇博客上的那个问题的高级方法
但效率有待进一步提高
create table t_money(id int primary key,amount int not null);
insert into t_money values(1,2);
insert into t_money values(2,2);
insert into t_money values(3,3);
insert into t_money values(4,5);
insert into t_money values(5,2);
insert into t_money values(6,8); ...
- 2009-08-31 21:09
- 浏览 1147
- 评论(0)
表结构如下:
create table t_money(id int primary key,amount int not null);// id 是序列号,amount是金额
对如下数据进行查询:
+----+--------+
| id | amount |
+----+--------+
| 1 | 2 |
| 2 | 2 |
| 3 | 3 |
| 4 | 5 |
| 5 | 2 |
| 6 | 8 |
| 7 | 1 |
| 8 | 2 |
| 9 | 3 |
| 10 | ...
- 2009-08-25 20:37
- 浏览 1281
- 评论(0)