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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Spliting an array in half using asp

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-04-20 : 10:00:41
Greg writes "I was wondering if there is a way to take an array or recordset and split in half. I have 20 records and I need to make two arrays half with 10 the other half with the other ten. thanks"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-04-20 : 12:08:31
select top 10 * from table1 order by id asc
select top 10 * from table1 order by id desc

I'm being a bit facetious....but given the scarcity of information supplied...i'm (in my mind) entitled to that liberty.

However, if you can give us sample input data and expected results....we might be able to come up with something a bit more useful.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-04-20 : 12:20:13
In my mind, I'm no developer, so I'm not sure....

Doesn't rs.0 hold the # of records in the set?

Doesn't sound like a sql issue...

Loop While rs.0/2 = i?

Is like that? I don't know....we had better get a interface devloper here to lend us a hand.



Brett

8-)
Go to Top of Page
   

- Advertisement -