原帖地址:
表test中记录: 【相关文章:PHP5的对象模型[12]--类的自动加】
http://community.csdn.net/expert/topic/3190/3190686.xml?temp=.6296961 【扩展阅读:PHP5的对象模型[11]--重载】
aa bb 【扩展信息:PHP5的对象模型[13]--对象串行化】 001 50.5 002 60 003 15.4 004 25 005 48 ...输入任一金额,然后在表中查找是否有该金额或几条记录的合计等于该金额.
如:输入25,则要找出004,输入85,则要找出002与004,依次类推。 ------------------------------------------------------------------------------------ --测试数据 create table test(aa varchar(10),bb numeric(10,2)) insert test select ´001´,50.5 union all select ´002´,60 union all select ´003´,15.4 union all select ´004´,25 union all select ´005´,48 union all select ´006´,37 go--查询函数
create function fn_search(@num numeric(10,2)) returns @r table (aa varchar(10),bb numeric(10,2)) as begin declare @t table (aa varchar(8000),aa1 varchar(10),bb numeric(10,2),level int) declare @l int... 下一页