On Tue, Aug 5, 2008 at 3:19 PM, Martin Evans <[EMAIL PROTECTED]>wrote:
> Amit Saxena wrote: > >> Hi all, >> >> What's the DBI equivalent of Oraperl ora_titles function ? >> >> I need it because I want to get the titles (column names) of a select >> query >> into an array without fetching the row values from the database. >> >> Thanks & Regards, >> Amit Saxena >> >> > I have not used Oraperl but the column names are statement attributes. > > See > http://search.cpan.org/~timb/DBI-1.607/DBI.pm#NAME_(array-ref,_read-only)<http://search.cpan.org/%7Etimb/DBI-1.607/DBI.pm#NAME_%28array-ref,_read-only%29> > > You may also want to look at NUM_OF_FIELDS. > > but you need to issue a select to get them via that method - although not > necessarily fetch any rows. See column_info for an alternative that only > works for getting column names from a table - not a select statement. > > Martin > -- > Martin J. Evans > Easysoft Limited > http://www.easysoft.com > Thanks Martin, It worked for me. Regards, Amit Saxena
