|
 |
asp_databases thread: Unusual SELECT request
Message #1 by "Beric Holt" <buzzrick@h...> on Thu, 25 Oct 2001 23:38:28 +0000
|
|
Is it possible to create a select statement which returns an arbitary number
of records? For example I want to return a recordset listing the numbers 1
to 10.
I've tried setting up select statements like:
SELECT intNum AS intNumber WHERE intNum in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
but this doesn't work. I've had to resort to creating a table with these
values, which isn't elegant.
Any help would be greatly appreciated.
Cheers
Buzzrick
Message #2 by "Ken Schaefer" <ken@a...> on Fri, 26 Oct 2001 18:08:42 +1000
|
|
SELECT 1
UNION
SELECT 2
UNION
SELECT 3
UNION
SELECT 4
ORDER BY 1
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Beric Holt" <buzzrick@h...>
Subject: [asp_databases] Unusual SELECT request
: Is it possible to create a select statement which returns an arbitary
number
: of records? For example I want to return a recordset listing the numbers
1
: to 10.
:
: I've tried setting up select statements like:
: SELECT intNum AS intNumber WHERE intNum in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
: but this doesn't work. I've had to resort to creating a table with these
: values, which isn't elegant.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "NabinKumar Sahu" <sahunabin@r...> on 29 Oct 2001 05:55:51 -0000
|
|
Buzzrick
1.Create a table
2.In the Data Type column, click the arrow and select AutoNumber.
3.To create a random AutoNumber, in the bottom part of the window on the
General tab, set the NewValues property to Random.
After that you try this QUERY
"SELECT intNum FROM Table NAME;"
NAbin Sahu
INDIA
|
|
 |