Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the first row from a select

Re: Getting the first row from a select

From: David Ferguson <DavidFerguson_at_csi.com>
Date: 1998/10/07
Message-ID: <#v$bRBg89GA.188@nih2naab.prod2.compuserve.com>#1/1

>Maybe I'm missing something obvious....
>
>I'm trying to write a VB program that will get the first record from a
 query
>something like:
>
>select * from COMPANY where COMPANY_NAME >= 'whatever was entered';
>

Using the dbOpenForwardOnly type of recordset may eliminate the cost of doing the simple query and only using the first retrieved column.

Under certain conditions you can get the first row by adding the clause ROWNUM=1 to the query.

Cheers...David Received on Wed Oct 07 1998 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US