使用Read()记录计数 [英] Record count using Read()
本文介绍了使用Read()记录计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在尝试填充列表视图网格之前,我试图弄清楚如何获得最大记录数.我正在使用Oracle 10g数据库,并且已经尝试过:
I am trying to figure out how to get the max record count before i populate a listview grid. I'm using the Oracle 10g DB and I've tried:
SELECT COUNT(*) as countNum, status, date, theTitle, theMessage, date2 " & _
"FROM blah blah...
messagebox.show(dr(0))
但是,这会使SQL查询崩溃.看来我好像不会在查询中放入与计数"相关的任何内容,否则它将崩溃,所以还有其他方法可以查看它返回多少条记录吗?
But that makes the SQL query crash. It doesnt seem as though i am about to put anything related to "count" in my query or it will crash so is there any other way i can see how many records it returns other than that?
谢谢! :o)
大卫
推荐答案
使用分析计数,如下所示: 在()上选择COUNT(*)作为countNum,状态,日期,标题,邮件,date2& _ 等等……
Use analytical count like so: SELECT COUNT(*) over () as countNum, status, date, theTitle, theMessage, date2 " & _ "FROM blah blah
这篇关于使用Read()记录计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文