SQL Query Paging With Buttons

May 31, 2006

hello, I have this project that I can't find it.
let's say we have more than 100 000 rows in a table called table 1, so if we do: SELECT * FROM TABLE1
the result will be dispalying all the rows with a large scrollbar.
But there's a new TSQL in SQL 2005 "ROW_COUNT" which will help to do the paging. so I have found the procedure but all I need now is to display NEXT and PREVIOUS button in the results in order to switch between the pages. So please any help, Thank you

View 1 Replies


ADVERTISEMENT

Paging Query

Aug 2, 2006

I have created a stored proc for paging on a datalist which uses a objectDataSource.
I have a output param itemCount which should return the total rows. Them I am creating a temp table to fetch the records for each page request. My output param works fine if I comment out all the other select statements. But returns null with them. Any help would be appreciated.
CREATE PROCEDURE [dbo].[CMRC_PRODUCTS_GetListByCategory]( @categoryID int, @pageIndex INT, @numRows INT, @itemCount INT OUTPUT )AS
SELECT @itemCount= COUNT(*) FROM CMRC_Products where CMRC_Products.CategoryID=@categoryID  Declare @startRowIndex INT; Declare @finishRowIndex INT; set @startRowIndex = ((@pageIndex -1) * @numRows) + 1; set @finishRowIndex = @pageIndex * @numRows 
DECLARE @tCat TABLE (TID int identity(1,1),ProductID int, CategoryID int, SellerUserName varchar(100), ModelName varchar(100), Medium varchar(50),ProductImage varchar(100),UnitCost money,Description varchar(1500), CategoryName varchar(100), isActive bit,weight money)
INSERT INTO @tCat(ProductID, CategoryID,SellerUserName,ModelName,Medium,ProductImage,UnitCost,Description,CategoryName, isActive,weight)SELECT     CMRC_Products.ProductID, CMRC_Products.CategoryID, CMRC_Products.SellerUserName,  CMRC_Products.ModelName, CMRC_Products.Medium,CMRC_Products.ProductImage,                       CMRC_Products.UnitCost, CMRC_Products.Description, CMRC_Categories.CategoryName, CMRC_Products.isActive,CMRC_Products.weightFROM         CMRC_Products INNER JOIN                      CMRC_Categories ON CMRC_Products.CategoryID = CMRC_Categories.CategoryIDWHERE     (CMRC_Products.CategoryID = @categoryID) AND (CMRC_Products.isActive = 1)
SELECT    ProductID, CategoryID,SellerUserName,ModelName,Medium,ProductImage,UnitCost,Description,CategoryName, isActive,weightFROM         @tCat WHERE TID >= @startRowIndex AND TID <= @finishRowIndexGO

View 12 Replies View Related

Query Paging

Apr 29, 2006

let's suppose that we have a table entitled "tab1" which has more than 1000 rows and about 10 columns

so in SQL 2000, if I do this query:

SELECT * FROM tab1

the result will be displaying all the rows from the begining.

and my teacher told me that there's a new option in SQL 2005 which is you can display the result of the query in a page mode.

so can anyone tell me how can I do so for this query:

SELECT * FROM tab1

so that I can see the results in pages.



thanks

View 7 Replies View Related

Paging Query Without Using Stored Procedure

Dec 1, 2006

Hello, my table is clustered according to the date. Has anyone found an efficient way to page through 16 million rows of data? The query that I have takes waaaay too long. It is really fast when I page through information at the beginning but when someone tries to access the 9,000th page sometimes it has a timeout error. I am using sql server 2005 let me know if you have any ideas. Thanks
 I am also thinking about switch datavase software to something that can handle that many rows. Let me know if you have a suggestion on a particular software that can handle paging through 16 million rows of data.

View 1 Replies View Related

Select Query For Custom Paging

May 23, 2007

 Hi,I
am working on this select query for a report on website users. The
resulting rows will be displayed in a datagrid with custom paging. I
want to fetch 100 rows each time. This is the simplified query,
@currpage is passed as a parameter. ________________________________________________________________________________DECLARE @table TABLE (rowid INT IDENTITY(1,1), userid INT)INSERT INTO @table (userid) SELECT userid FROM UsersSELECT T.rowid, T.userid, ISNULL(O.userid, 0)FROM @table TLEFT OUTER JOIN ( SELECT DISTINCT(userid) FROM orders)AS OON O.userid = T.useridAND T.rowid > ((@currpage-1) * 100) AND T.rowid <= (@currpage * 100)ORDER BY T.rowid________________________________________________________________________________If
I run this query it returns all the rows, not just the 100 rows
corresponding to the @currpage value. What am I doing wrong? (The
second table with left outer join is there as I need one field to
indicate whether the user has placed an order with us or not. If the
value is 0, the user has not placed any orders) Thanks. 

View 2 Replies View Related

How Do I Write A Query (which Uses A Union) Suitable For Paging

Aug 13, 2007

How do I write a query (using a union) suitable for paging
I currently have a query which results from two queries combined by a union. It returns 3000 rows. I want to replace that query with one which returns only 50 rows from the relevant page [using ROW_NUMBER()].
Is there a way to do this with only 1 CTE or will I need to use two consecutive CTEs [the first get a union on the queries and the second to apply ROW_NUMBER()]. I can't see a way of doing it with only 1 CTE table.
 Alternatively is there a very efficient way to do it using derived tables?

View 1 Replies View Related

Paging Query Bugs Out When Adding A Where Clause

Oct 10, 2007

I am getting incorrect results from my paging query, where the same results are being returned multiple times. Here are two queries I have found to bring the same results:select top 20 * from lookupdocuments_dbv where catname_cst='MyCategoryName' and (docid_cin not in (select top 620 docid_cin from lookupdocuments_dbv where catname_cst='MyCategoryName'))select top 20 * from lookupdocuments_dbv where catname_cst='MyCategoryName' and (docid_cin not in (select top 640 docid_cin from lookupdocuments_dbv where catname_cst='MyCategoryName'))When I remove the catname_cst where clause it brings back results properly (i.e. records 622-642 and 643-663). What is wrong with my where clause that is causing identical data to be returned? 

View 8 Replies View Related

Paging Query In Sql Server Compact Edition

Jul 26, 2007

Hi,

I want to write query to implement paging in sql server ce 3.0. But it seems it does not support TOP or LIMIT keyword.
Can someone suggest alternative way to write a custom paging query in sql server ce 3.0.

Thanks,
van_03

View 3 Replies View Related

Paging (retrieving Only N Rows From A Select Query) Like LIMIT

Jun 28, 2002

Message:

Hi,

Suppose i execute a query,

Select * from emp,

I get 100 rows of result, i want to write a sql query similar to the one available in MySql database where in i can specify the starting row and number of rows of records i want,

something like,

select * from emp LIMIT 10,20

I want all the records from the 10th row to the 20th row.

This would be helpful for me to do paging in the front end , where is i can navigate to the next previous buttons and fetch the corresponding records.

I want to do something like in google, previous next screens.

So I am trying to limit the number of rows fetched from a query.

somethin like,

select * from emp where startRowNum=10 and NoOfRecords = 20

so that i can get rows from 10 to 30.

Has any1 done this, plz let me know.

Cheers,
Prashant.

View 1 Replies View Related

Buttons

Feb 20, 2007

Hi.

Is there a way to insert a command button or flash button on to a report?

im using SSRS 2005 with VS 2005


Thanks...

View 5 Replies View Related

Simple Navigation Buttons.....

Jan 24, 2007

  Hi all,
I'm trying to design a website with my old MS Access Application as a template, because my users know that style. I use textboxes to display data from the MSSQL 2005 database,  one record and 20 fields per page ....and i would like to navigate through the records with 4 buttons: first, last, next and prior, placed on the page.I tried a lot of things, and my last attemt was a  Stored Procedure with a Cursor to do the trickbut.... it did not work 
It's very easy to do this in MS Access.
Can anyone tell me a simple way to do this ?
 
 

View 5 Replies View Related

Scripting Dynamic Buttons

Apr 29, 2008

Ok, I have tried everything to make this work, including a very extensive search on the web to no avail.

What I am trying to do, is through a web page a created, auto pull 3 tables out of a SQL view and display the data real time. This part works, and I am further able to create dynamic hyperlinks based on the data pull.

Where the problem arises is in creating a submit button that will run an application. The code to do this is dependent on the running SQL query loop. Here is what I have.
_______________________________________________________________

<html>
<head>
<title>Computer / MAC Address Pull</title>
<meta name="Microsoft Theme" content="none">
<meta name="Microsoft Border" content="none">
</head>
<body>


<P>
<H2 ALIGN= CENTER>Computer / MAC Address Pull</H2>
</P>


<TABLE WIDTH= '90%' BORDER='0'ALIGN= CENTER>
<TR><TD WIDTH= '10%'Align=center><B>Computer Name</TD>
<TD WIDTH= '8%'Align=center><B>IP Address</TD>
<TD WIDTH= '10%'Align=center><B>Mac Address</TD>
<TD width= '8%'Align=center><b>Power On</TD>
<TD width= '8%'Align=center><b>Count</TD>
</TABLE>


<%

dim rs
dim int
int = 1
dim input

dataSent = Request.Form("t1")
cString = "Provider=SQLOLEDB;User Id=****;password=****;Initial Catalog=dareporting;Data Source=****;"
set rs = CreateObject("ADODB.Recordset")
rs.open "select computer, address, mac from view_mac_address" ,cString
rs.MoveFirst

Response.Write "<input type=textbox id=sqlsearch>"
Response.Write "<input type=button value=submit id=submit>"



function WOL()
Dim Input
input = rs("mac")
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:mc-wol.exe " & input
end function

Response.Write "<TABLE WIDTH= '90%' BORDER='1'ALIGN= CENTER cellspacing=0 cellpadding=0 mso-border-alt:solid navy >"

Do while NOT rs.EOF
dim mac1
Set WshShell = WScript.CreateObject("WScript.Shell")
'mac1="WshShell.Run 'C:mc-wol.exe ' &rs('mac')"
mac2="WshShell.Run 'C:mc-wol.exe ' &rs('mac')"
Response.Write "<TR><TD WIDTH= '10%'Align=center><a href='https://"&rs("address")&":2000'>" & rs("computer") & "</TD>"
Response.Write "<TD WIDTH= '8%'Align=center>" & rs("address") & "</TD>"
Response.Write "<TD WIDTH= '10%'Align=center>" & rs("mac") & "</TD>"

'Response.Write "<TD WIDTH= '8%'Align=center><input type=button value='start' onclick='WOL()'></TD>"
Response.Write "<TD WIDTH= '8%'Align=center><input type=button value='start' onclick="&mac2&"></TD>"

Response.Write "<TD WIDTH= '8%'Align=center>" & int & "</TD>"

int = int + 1

rs.MoveNext

Loop
Response.Write "</TABLE>"

%>

<p></p>

</body>
</html>

___________________________________________________________

Essentially what this does, is display with headers, a listing of my domains computer names, IP addresses, MAC Addresses, and a Start button. Since this is tied to my SQL database you wont be able to view the output, but what I want to do is, in the loop, have the Start button grab the running mac addresses and place it into the following code:
__________________________________________________________
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:mc-wol.exe " &rs("mac")
__________________________________________________________
This will allow me to (I hope), on click, open a command prompt, run the code with the respective mac address, and start the computer.

Where the problem lies, is that I can not figure out how to encapsulate the mac address inside that code while in the loop... any ideas would be greatly appreciated! If you have any questions, please let me know.

View 3 Replies View Related

Navigation Buttons Dimmed

Apr 11, 2007

Anyone know why my navigation buttons on my reports is always dimmed so that I can only see the very first page of every report? I even spent some time with a Microsoft SQL Server engineer trying to figure this one out and he wasn't able to figure out why?



I tried to attach a picture but I guess pictures aren't allowed. The first page, previous page, next page and last page buttons displayed as arrows on the top left of the reports are always dimmed on every report even though they have multiple pages.



Has this happened to anyone and how did you get it fixed?



Thanks



View 4 Replies View Related

What Are The Algorithms Used In The Different Feature Buttons In The DM Add-IN For Excel?

Jun 19, 2007

I was just wondering on what algorithms was used in the different feature buttons in the Excel Add-In? For example, forecast, what algorithm was used in order for it to create the forcasting?


View 1 Replies View Related

Populating Radio Buttons - Access Vs. MSSQL

Dec 10, 2007

Have recently migrated an Access database to MSSQL.

The following code worked in Access but fails in MSSQL


<input <%If (CStr(Recordset1.Fields.Item("Disclose").Value) = CStr("TRUE")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="Disclose" value="1">

<input <%If (CStr((Recordset1.Fields.Item("Disclose").Value)) = CStr("FALSE")) Then Response.Write("CHECKED") : Response.Write("")%> name="Disclose" type="radio" value="0" >


In Query Analyzer, when I run SELECT Disclose from TABLE, it returns the number 1.

On an ASP page, when I run Response.Write(Recordset1.Fields.Item("Disclose").Value) it returns TRUE.


Have tried changing the = CStr("TRUE") portion to = 1 but it fails to work either way.

Any ideas?

View 1 Replies View Related

Adding Custom Buttons To The Parameters Toolbox?

May 3, 2007

Hi,

I am interested in adding custom buttons to the parameters toolbox (under "View Report"). I'm trying to provde a way for users viewing the report to go "Back" or up a level (in the drill through reports). Does anyone have any information on this topic, or know if it's even possible?



Thanks in advance,

-Brandon

View 3 Replies View Related

Next And Previous Buttons Working With Unbound Data?

Apr 3, 2008

Hello.

I am trying to implement Next and Previous buttons on a web page that uses CE as the database, and having some trouble getting the logic figured out. The data is unbound and I'm not returning it all at once, so paging through it an item at a time isn't possible. Because of the high volume, I was thinking I could pass in the record ID each time I need to retrieve a record and every time the user hits the next or previous button, I'll just requery for the record I need. Does that sound reasonable?

In my main page, I'm using the ViewState to store the record ID that I need to acquire. This part works--it gives me the highest ID number (so that I get the most recent record):

if (!IsPostBack) {
// Start out with the most recent record in the selected category. GetHighestConfessionID() will return
// the ID of the most recent confession.
ViewState ["ConfessionID"] = mySearch.GetHighestConfessionID (int.Parse(ViewState["Category"].ToString()));
}


Here's where the trouble comes in--I need to go to the next record in the database when the user hits Next, but I don't know how to do that. My big idea was to issue this command in the Next button:

ViewState ["ConfessionID"] = GetNextConfessionID (ViewState ["ConfessionID"]);


But I'm not quite sure how to increment/decrement my ConfessionID, since it's not guaranteed to be sequential (a record could have been deleted).

If the user hits Next, for example, I need to query for the next record ID, but I'm not sure how to do that since they're not necessarily sequential.

Is there a simple solution? I feel like I'm making a mountain out of a molehill.

Thanks in advance for any ideas.

View 2 Replies View Related

Administrator Cannot See Administration Toolbar, Buttons And Shortcuts On Report Manager

Dec 23, 2006

Hy everybody.

I have recently installed from scratch RS 2003 on a WIN2003 SRV and got that the problem that the administrator cannot access or even see the regular administration toolbar and links at the Report Manager, such as Site Configuration, Upload New File, the common 'Contents | Properties ' tab, among other stuff. The only options available are 'Home', 'My Subscriptions' and 'Help', in the right superior link bar. I find this behaviour very strange, since the RS comes right out of the box configured with full access to administrator, but right now I CAN'T do any administration task on the RS Server.

Another strange behaviours I've found:
- The few links that appear redirect to the internal ip address of the server.
- When you call the '/ReportServer/ReportingService.asmx' it returns an XML document, not the usual browsing interface.

There's some information about the server configuration I think it might help:
- IIS is running more than one website, and the RS server is not installed on the Default WebSite, wich is stopped.
- SharePoint Services is running in the server, but not in the DefaultWebSite.
- The security settings of the virtual directory of the Report Manager are configured to use Windows Authentication and are NOT configured to use anonymous authentication.
- The server is published to the Internet.

There's some stuff that I tried and for now didn't worked:
- Create the virtual directories in other websites.
- Switch the attributes of the 'impersonate' attribute in Web.config file between true and false.
- Enable anonymous authentication and use the administrator account to impersonate.
- The steps described in the help article 'Troubleshooting a Side-by-Side Installation of Reporting Services and Windows SharePoint Services'
- Reinstalling the RS product.

I really hope you guys can help me with this.

Thanks in advance.
JC

View 1 Replies View Related

How To Create Radio Buttons For Parameters In Reporting Services 2005

Nov 15, 2007



Hello,

I am creating a report that the user will pick a value from about 6 items. The project manager would like these values to be represented as radio buttons on the ReportViewer control. I am unable to determine how do create these 6 radio buttons.

Here is a simple example to demonstrate what I need. Lets say the report returns the total number of fruit in a stores inventory. The choices are: Apple, Banannas, Oranges, Grapes, Cherries, Water Mellon.

I have a variable @Fruit that I would like populated by the user and I want them to select which piece of fruit they want to see by selecting a radio button. Is there a way to do this using Reporting Services 2005 Report Designer?

Thanks,
Flea#

View 5 Replies View Related

How To Not Auto Generate A Report, How To Use A Null Checkbox On A Param With Available Values, How To Add Back/forward Buttons?

Apr 3, 2008

Hey all,

1) I have a report with many parameters that I want users to be able to pick from. Allow them to pick 1, many or all to build their report dynamically. I'm all set on the TSQL side, but on the Reporting Services side I have to allow each parameter to be null with a default of NULL. In by doing this, the report will auto run, which I do not want to happen. The only resolution I've found thus far was by adding a parameter that does nothing, with a NULL default value. Yet It sticks out like a sore thumb on the report and I want to get rid of it. If I check in "Hidden" in the parameter options, my report errors out stating that the parameter requires a value.

2) Is it possible to have a parameter that has available values from a dataset have a NULL checkbox like those of parameters that do not have available values?


3) Is it possible to add back/forward buttons inside of a report instead of just at the report header by default?


Thanks!

View 8 Replies View Related

Sort Buttons Grayed Out In &"Data In Table&"

Aug 17, 2006

Hi -

This is a newbie question. For some reason when I view the contents of tables I have created on my SQL Server (version 7) database, the sort buttons in the "Data in Table" window are grayed out.

Do I need more permissions? How do I fix this?

Thanks.

View 1 Replies View Related

Paging

Oct 12, 2004

Is there any way to implement a paging scheme such that only the required records are transferred from SQL Server to the asp.net app?

The only support I can find such as the DataAdaptor.Fill will bring all the records back from SQL Server and then create the page...

This obviously still takes time and memory based on the entire query, not the page size.

Any ideas?

View 2 Replies View Related

SQL Paging

Jul 26, 2005

I have a table with a lot of records.  I want to make paging without passing all the data back to a dataset.  I know how to select the top n rows but how do I select 10-20 for example. 

View 3 Replies View Related

T-SQL Paging

Dec 9, 2005

Hello,
How can I do paging in my SQL Server stored procedure.
I have thought of a way, but I need to :

"SELECT TOP @Count..."

which is not allowed :S

What can I do to get around this?

View 1 Replies View Related

Paging In Sql 2k

Dec 11, 2003

I have noticed that the server i'm running SQL2k on is starting to page out of the norm. I can see that the regsvc and sqlservr svc are showing high page faults/sec. I have 3 gigs of ram and set the max that sql can use to 2 gigs. It is currently using only 168 MB and still will show high paging at random times. I know I can add more ram but that doesn't seem to be the problem. I have also stopped unnecessary services at the os level.

Any other suggestions to fix this?

Thanks in advance.

View 6 Replies View Related

Paging In RS

May 9, 2008

Hi there

I've managed to make it query that return a dataset that have 2 views utilising the "Filter" in RS. I treat this as a single record with multiple views.

Now let say if I have a stored precedure that pass 2 parameters one is called state and year and accepting 'ALL' for every possibility of State and Year and construct that into single dataset with 2 views similar like above.

How do I breakdown this in the reporting services so it will have paging?

This is a simple dataset:

RECORDID, ReportViewType, State, Year, VALUE
1, "VIEW1", "NSW", 1, null
1, "VIEW2", null, null, 10000
2, "VIEW1", "NSW", 2, null
2, "VIEW2", null, null, 11000
3, "VIEW1", "VIC", 1, null
3, "VIEW2", null, null, 11003
4, "VIEW1", "VIC", 2, null
4, "VIEW2", null, null, 11001

I would like to break down (paging) this per recordid. Each page obviosuly has 2 views using the same data set with different FILTER.

Do I need to put into a LIST then inside that list put 2 TABLES? Is this possible?!?!

Thanks

View 5 Replies View Related

Paging Problems

Dec 13, 2006

I am using a stored procedure to page some objectsThe procedure looks like this:
CREATE PROCEDURE sw20aut.sw20_Kon( @sid_nr INT, @sid_stl INT = 35, @kid int )AS BEGIN     SET NOCOUNT ON      DECLARE  @rader INT, @sid_antal INT, @ubound int, @lbound int  SELECT          @rader = COUNT(*),          @sid_antal = COUNT(*) / @sid_stl      FROM          sw20aut.sw_kontakter WITH (NOLOCK)  WHERE  kund_id = @kid AND del = '0'
 IF @rader % @sid_stl != 0 SET @sid_antal = @sid_antal + 1     IF @sid_nr < 1 SET @sid_nr = 1     IF @sid_nr > @sid_antal SET @sid_nr = @sid_antal     SET @ubound = @sid_stl * @sid_nr  IF(@sid_antal > 0) SET @lbound = @ubound - (@sid_stl - 1)  ELSE SET @lbound = 0      SELECT          CurrentPage = @sid_nr,          TotalPages = @sid_antal,          TotalRows = @rader
 DECLARE @ename VARCHAR(64), @fname VARCHAR(64), @konid VARCHAR(64) SET ROWCOUNT @lbound SELECT @ename = enamn, @fname = fnamn, @konid = kon_id FROM sw20aut.sw_kontakter WITH (NOLOCK)  WHERE kund_id = @kid AND del = '0' ORDER BY enamn, fnamn, kon_id SET ROWCOUNT @sid_stl SELECT kon_id, enamn, fnamn FROM sw20aut.sw_kontakter WITH (NOLOCK) WHERE enamn + fnamn + '~' + CAST(kon_id as VARCHAR(64))  >= @ename + @fname + '~' + @konid AND (kund_id = @kid AND del = '0') ORDER BY enamn, fnamn, kon_id SELECT startid = @konid SET ROWCOUNT 0END
The big problem is that i need to display objet with the same name. In my book the best identifier is the PK and therefor i have sorted as above by ordering after LastName, FirstName, ContactId
After som thinking ive reached the conclusion that this dont work if the idnumbers isnt of the same length. as long as they are(for example two people named John Smith, one with id = '23' and one with id = '87' it works. If there ids would have been '23' and '1203' it will not work correctly) of the same length it works fine.
What im wondering is if anyone have a good solution to this? Only thing i can think of is filling all idnumbers with zeros to equal length. Dont know how and if this will affect performance though. Anyone has a practical solution to this?

View 1 Replies View Related

Paging Technique

Aug 8, 2007

Questoin 
I am using Sql Server 2000.
I have a table named Cities which has more than 2600000 records.
I have to display the records for a specific city page wise.
I don't want to compromise with performance.
Can anyone has the idea?
Waiting for your fruitful response.
Happy Day And Night For All
Muhammad Zeeshanuddin Khan

View 1 Replies View Related

Paging , Sql Select From To ?

Feb 10, 2008

Hello To make pagination I would like to retrieve only the record from x to y ...I couldn't find how to do to in sql , I was thinking so if there is a way to do it with a sqldatasourceI make my request , put it in a sqldatasource and bind it to my datalistis there a way to "filter the sqldatasource ?" to make what I need ? Thx in advance ? 

View 4 Replies View Related

Custom Paging

May 23, 2005

Im in the process of trying to teach myself SqlServer, comming from Oracle.  How the heck do I get the equivlent of  %ROWNUM pseudo-column in SqlServer?  Top just isn't doing it for me.
 Oracle Example wrote:
Select * from foo where foo%ROWNUM > 10 and foo%ROWNUM <20;

View 12 Replies View Related

Paging Performance

Feb 21, 2003

I have a paging dilema with an ADO/ASP web based application.

Currently I am using the temp table and inserted index method of paging which works well but the pages that use this paging have a variety of filters on them and a largish subset of data available. This means that every time the page is refreshed the code is creating that temporary table, inserting all the data, selecting the subset and then dropping it.

I was looking for a more efficent way of getting paged data to the client. One of the alternatives I came across was using a server side forward only cursor and the ado getrows() method. This sounds good in princible but I don't know if I am going to get a performance hit by using a server side cursor as opposed to sending the entire recorset to the client and letting it page the results.

Would it be any better to use a stored procedure and pass the full sql statement to it. I can't actually write the sql into the stored procedure becuase it is all totally dynamic.

So I guess I have three options, temp tables, server side cursor and small amounts of data sent to the client or client side cursor and large amounts of data sent to the client.

Any ideas or recomendations?

View 1 Replies View Related

Paging Question

Jan 5, 2007

Is this a correct statement? When commit Charge total (k) is greater than Physical Memory total (k) then the server is paging badly, correct?

thanks.

View 3 Replies View Related

Help Using Row_Number For Paging

Apr 25, 2008

Hi,

My application runs this query using a stored proc

SELECT empid1,name1,joindate from emp where empid2=3
union
select empid2,name2,joindate from emp where id1=3

Now I want to implement paging for the same using Row_Number so that I can display the results in pages.
Can someone please help me write a query for the same. I tried playing with Row_Number but no luck with it.Basically I am not good with SQL and I had programatically implemented paging in asp.net by looping through all records returned by the query.



Thanks,
Ganesh

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved