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 |
|
naren_venkata@yahoo.com
Starting Member
3 Posts |
Posted - 2008-05-23 : 08:28:46
|
| hi all,I have one table called Supplier,In that i have one field with name Supplier_Name.My requirement is,I need one Stored procedure to fill Drop down list.In That drop down first time,I need to fill first Three names of the Suppliers(1,2,3 Positions),Next time when user opens that form drop down should contain next 3 suppliers(4,5,6 Positions),Next time again next 3 suppliers(7,8,9 Positions).Like this it has to select Three suppliers in a loop.Any body give me stored Procedure for this.I am using Sql Server 2005 Database.Pls help me. |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-05-23 : 10:48:38
|
| you want to page data in a combobox?_______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-05-23 : 10:51:12
|
doesn't sound like very "standardized" functionality - If you have 3 concurrent users should all of them get the first 3 suppliers or should user1 get 1-3, user2 get 4-6, etc?- If you have 10 suppliers what should the 4th call return? supliers(10,1,2 positions)?You should either: -add a @startFromPosition parameter and return the TOP 3 WHERE position >= @startFromPosition ORDER BY...let your application track the last position - return and cache all suppliers and handle the "looping" with application codeBe One with the OptimizerTG |
 |
|
|
naren_venkata@yahoo.com
Starting Member
3 Posts |
Posted - 2008-05-24 : 01:00:58
|
| Thanks for reply.I need it when page is loaded.I have to fill it in Drop down list.Regards. |
 |
|
|
|
|
|
|
|