Sure...
Firstly, the point table store information about one place's city, longitude、 latitude、description、createddate、lastupdated..ect..
I am going to create a web application that integrate GoogleMap.
There are two features of the application.
Get the newest 100 points that were created by users.
Get the lastest 100 points that were modified by users.
moreover, the result can be filtered by city again.
I am planning to display the data with DataGrid.
Also, I am using custom pager (that's problem...I need to do the pager by myself, not Datagrid. The reason I do that because of performance. I don't want datagrid to bind all the records. I just want the grid to display the records depend on what the page is...)
Therefore, I need to give count of total records to datagrid.
In SQL way, I do this way
select count(*) from (select top 100 * from js_point order by createddate) as point
select count(*) from (select top 100 * from js_point order by lastupdated) as point
I have tried something as following...however, no lucky...
select count(*) from js_point order by createddate
(or with group by...)
Hope that's useful...thank you
|