1.分页查询,一次50条数据
function pIng50(TableName,page)
{
if(parseInt(page)==NaN||page==""){
page="1"
}
return "select * from
(select ttt.*,rownum as rn from ("+TableName+") ttt)
where rn<=50(to_number("+page+") and rn>50*(to_number("+page+")-1)
)"
}
查大于本月以后的信息
select* from tablename where date>=trunc(sysdate,'Month')
3.高级模糊查询,跳着查,比如查心电图门诊,搜索心门就能出来结果。
解决:先把搜索词进行分词取出,利用%遍历间隔插入,形成sql语句。使用split+join使用。
var name1 = "%"+name.split("").join("%")+"%";