Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
abhit_kumar
Posting Yak Master
147 Posts |
Posted - 2010-01-23 : 09:22:43
|
Hello All,I have to made one report in which i have to follow counter logic.I have to put selection parameter in that dropdown box there willbe choices to pick all this nos ..i.e 1,2,3,4,5,6.Now based upon that selection i have to fecth data from table.For example if we select counter 1 then it always return last updated record from table,if suppose we select 2 then it should return last two updated records from table, and based upon that it should be presented on reports.Selection Parameter===================Counter :- "1" "2" "3" "4" "5" "6"If user select "2" from selection parameter then it should display last added 2 records from table as mentioned below like this:-ID No. Name Address ID No. Name Address----------------------- ------------------------100 Raj Gujarat 200 Raj GoaI have given selection paramter for counter, but when i select 1 or 2 it not displaying the records in that manner.Please help me about this.'Thanks,Avijit |
|
Kristen
Test
22859 Posts |
Posted - 2010-01-23 : 11:26:24
|
Would this do? if not I don't think I have understood the problem fullySET ROWCOUNT @SelectionParameterSELECT Col1, Col2, ...FROM MyTableORDER BY LastUpdateDateSET ROWCOUNT 0 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-24 : 09:52:42
|
which is column that containes updated info in your table? is there any audit info column like last modified? also are you using sql 2005? |
|
|
abhit_kumar
Posting Yak Master
147 Posts |
Posted - 2010-01-24 : 23:09:32
|
Hi,Im using sql 2005 and the table is basically used to enter the details of Purchase order |
|
|
abhit_kumar
Posting Yak Master
147 Posts |
Posted - 2010-01-24 : 23:43:28
|
please provide me the logic so that i can extract data from report dataset itself. |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-01-25 : 02:21:59
|
"please provide me the logic ..."You need to provide what we have asked you for.1) Did my example work?2) Provide answers to Visakh's questions. |
|
|
|
|
|
|
|