Current location: Hot Scripts Forums » Programming Languages » ASP » help! urgent.. how to select next 50 records?


help! urgent.. how to select next 50 records?

Reply
  #1 (permalink)  
Old 04-21-04, 01:35 AM
angela angela is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
help! urgent.. how to select next 50 records?

hi

i have a huge database...currently a few thousand records..and its still expanding...
because of that i can't update the table at one time...it either goes into infinite loop or something to do with database timeout... i was advice by my lecturer to update the records 50 at a time...

now i am retrieving 50 records...after editing the values...update the 50 records and loop thru retreive the next 50 records..update...retrieve next 50 till end of file...but.......after selecting the first 50 records....using this

SELECT Top 50 * From customer_info order by customer_id

i have no idea how to select the next 50........i need help please...


an example i saw while surfing the net

select * from customer_info limit 1,255

would possibly solve my problem but
it gave this error
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '1'.
hmm seems like the identifier limit is not recognise in the sql server

please help..thank u!!
Reply With Quote
  #2 (permalink)  
Old 04-21-04, 10:58 AM
tHeVibe tHeVibe is offline
New Member
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Try to use LIMIT option

Hy!
Try to use SELECT * FROM ...... LIMIT $limit,50

I hope will work like this! Good luck.
tHeVibe
devessence-c o m
Reply With Quote
  #3 (permalink)  
Old 04-22-04, 11:49 PM
af11kcc's Avatar
af11kcc af11kcc is offline
Newbie Coder
 
Join Date: Sep 2003
Location: MX
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Check for Recordset paging either using ADO or Getrows
__________________
<%= af11kcc %>
Reply With Quote
  #4 (permalink)  
Old 04-24-04, 12:58 PM
angela angela is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
thank u

Thanks for the help!!

my project is due and yes..i managed to submit it on time...

i tried using LIMIT..it can't work...
sql server don't recognise the identifier LIMIT

initially i wanted to use GetRow..but i have problem with that...so i chage my concept..

i did the a comparison between the smallest and largest record then slowly i manage to get it working...

nonetheless, THANKS for all the help! learn a lot from u guys! really appreciated!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP/MySQL HELP URGENT mathieu67 PHP 1 04-13-04 03:46 PM
i have 3 select box this is urgent traceMe JavaScript 0 12-02-03 01:24 AM
Create a next page link when there are too many records to be display in a webpage Han84 ASP 0 10-19-03 10:32 PM
asp: URGENT! need to change code to create new form per id seala ASP 2 09-09-03 09:54 PM
Insert...select andreasberglind PHP 5 08-21-03 05:07 PM


All times are GMT -5. The time now is 04:18 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.