I remembered there is column alias like

bro all from tablename where #2 = value

which will look at column# 2.

Wonder if there is one for row?

Dan Goldberg

From: [email protected] [mailto:[email protected]] On Behalf Of 
Dan Goldberg
Sent: Tuesday, August 9, 2016 10:42 AM
To: [email protected]
Subject: RE: [RBASE-L] - pick a random row

I wish it was that easy.

If I remember correctly there is a way to select a row by the row number?

Then I could do.

Select all from tablename where row_number = 1

If can remember the syntax for that maybe I can do a random on that.

Dan Goldberg

From: karentellef via RBASE-L [mailto:[email protected]]
Sent: Tuesday, August 9, 2016 10:25 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: [RBASE-L] - pick a random row

would adding "and limit = 1" do the trick?  It isn't quite random because I 
believe it would always select the first physical row that matches the where 
clause.

Karen



-----Original Message-----
From: Dan Goldberg <[email protected]<mailto:[email protected]>>
To: rbase-l <[email protected]<mailto:[email protected]>>
Sent: Tue, Aug 9, 2016 12:06 pm
Subject: [RBASE-L] - pick a random row
I have a select statement that I need to create that will pick one random row 
based on the where clause.

SELECT *FROM averyweb_items WHERE  iditemscategory = 4 AND  itemsstatus = 1

I can do a random function but not sure on how to implement it.

I cannot figure out what I need to do. Any help is appreciated.

TIA



Dan Goldberg
MIS Manager
Lance Camper Mfg. Corp
(661) 949-3322 Ext 252
www.lancecamper.com<http://www.lancecamper.com/>


--
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to