Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A1D6B2E2D92 for ; Tue, 11 Dec 2007 08:07:20 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 66925-06 for ; Tue, 11 Dec 2007 08:07:11 -0400 (AST) Received: from web53508.mail.re2.yahoo.com (web53508.mail.re2.yahoo.com [206.190.37.69]) by postgresql.org (Postfix) with SMTP id A29042E0058 for ; Tue, 11 Dec 2007 08:07:17 -0400 (AST) Received: (qmail 35528 invoked by uid 60001); 11 Dec 2007 12:07:16 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=bjhFRahFqDpUaeOJH//tJgQX6Kcf0Bt/mqiiE0rNl3/KFfpZ0XBOvet8yWOC8+upsMWwlP1ArO3xcKlL1sJS6U2+kIRvaBnPWbQwbZvsw2EQV3PCDylWz4XIR984pPCh4Xs0bBBArLt/ipGA2hBJ5uJDcSBKWIHqyioLQW2Tbtk=; X-YMail-OSG: a5t5Fs0VM1m3QEZ61p_NkYiwtziCcREHBb2RMExnTjYzdST0C7Zb2YsdSqTzc6YBWERW31GCtXYAuToErstoR_Fh6T7y9G2mfj5DVJ7W9Aydb98y6Mv.PMIx23fZLA-- Received: from [196.14.186.131] by web53508.mail.re2.yahoo.com via HTTP; Tue, 11 Dec 2007 04:07:16 PST X-Mailer: YahooMailRC/818.31 YahooMailWebService/0.7.158.1 Date: Tue, 11 Dec 2007 04:07:16 -0800 (PST) From: Allan Kamau Subject: (Pl/SQL) Obtaining field names from record 'variable' To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <248682.35322.qm@web53508.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/49 X-Sequence-Number: 27566 Hi, I am writing a PL/SQL script to process data from a high dimensionality table where this table has most of it's field names encapsulating data. I would like to automatically loop through the fields of a RECORD variable (returned from a cursor) obtaining the field name and the field value. For example my table is listed below (briefly) create table my_table ( id int not null-- default nextval(('my_table_seq'::text)::regclass) ,some_explanation varchar(20) not null ,D30 varchar(100) null ,W32 varchar(100) null ,C33 varchar(100) null ,V7 varchar(100) null ,... ) ; The field name W32 consists of 'W' which is data I need and '32' which is data I also need along with the actual record value contained in this field. Allan. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ