Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - SQL HELP - SELECT STATEMENT
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL HELP - SELECT STATEMENT

 Post Reply Post Reply Page  123 5>
Author
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Topic: SQL HELP - SELECT STATEMENT
    Posted: 24 August 2003 at 1:36pm

I need to select the TOP 16 rows and for each row, create a field so I can manually place it on a page (in a confined layout) without having to do all kinds of jibberish repeat region statements and what not.

Is this possible? If so, what is the statement to do it?

The page I am trying to do this on is @ www.rotsquad.com/tournament/brackets.asp - you'll see I need to display certain records based on some filters but with that layout you cannot do repeat regions or even nested.

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 1:38pm

SELECT TOP 16 * FROM FIELD; - I think thats what you want...

Mart.

Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 5:25pm

SELECT TOP 16 * FROM FIELD

That will only pull the top 16 records out of a select field right? Well, I need each of those records pulled to be created as a FIELD ITEM. 

Like when you do:

SELECT COUNT(tournid) AS totaltournid or something.

Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 5:26pm

Basically, if you look at that reference page above you'll see what I'm trying to do.

I need to pull the top 16 records out each as a field item so I can individually place one by one in the table on the far left.  Then create another recordset that will pull out only 8 records which I will place one by one, etc.  Get it?

Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 6:34pm

Basically, I need to collect the content of recordset into an array so I can individually place values from the recordset.

How do I do all that?

Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 6:56pm
You can place a recordset into an array by using the GetRows Method

arrayName = RecordSetName.GetRows

it will create a two dimensional array with your recordset data.
Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 8:26pm

I think I have it working for now ... I was trying to use a basic array and kept getting a Type Mismatch.

Thanks for steering me in the right direction!

 

<-- newb

Back to Top
Mikeap View Drop Down
Newbie
Newbie


Joined: 12 March 2003
Location: United States
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikeap Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2003 at 8:33pm

If the value I am displaying is null, how can I make it say something like "None" ...

I tried If isnull(arrRound1(3,1) then but that doesn't work?

Back to Top
 Post Reply Post Reply Page  123 5>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.