Re: [GENERAL] selecting a random record

2001-02-11 Thread Arun Malhotra - Roll No.99007
Hi I dont know exactly why u need this but this can be done in MySQL/PERL create a file called random.pl i select a random reecord from Temp table with PK temp_id #! /usr/bin/perl -w use Mysql; $i = (10*rand())%10; $dbh = Mysql->Connect('localhost','DBNAME','root'); $sth = $dbh->Query("Se

Re: [GENERAL] selecting a random record

2001-02-07 Thread Alexey Borzov
Greetings, Culley! At 06.02.2001, 13:11, you wrote: CH> Any suggestions on how to select a random record from CH> any given table? SELECT * FROM any_given_table ORDER BY random() LIMIT 1; -- Yours, Alexey V. Borzov, Webmaster of RDW

Re: [GENERAL] selecting a random record

2001-02-06 Thread Culley Harrelson
Can this be done in the framework of plpgsql? I know I can do it in the front end (java) but it would be nice to aviod having to grab the rowcount first. I haven't seen a random function in the documentation. I could install another language but boy am I lazy :) --- Mark Lane <[EMAIL PROTECTE

Re: [GENERAL] selecting a random record

2001-02-06 Thread Warren Vanichuk
Greetings. I have a smallish sized database that's getting alot of update transactions to it. It's been running fine over the past several weeks, but suddenly I'm starting to see : NOTICE: Deadlock detected -- See the lock(l) manual page for a possible cause. NOTICE: current transaction is a

[GENERAL] selecting a random record

2001-02-06 Thread Culley Harrelson
Any suggestions on how to select a random record from any given table? Culley __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/