pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David B <postgresql@thegatelys.com>
To: pgsql-sql@postgresql.org
Subject: Referring to derived column name in a RECORD
Date: Fri, 24 Oct 2003 16:19:42 -0700
Message-ID: <GOEGKICPFOPNLIEIHGFJEEHKCCAA.postgresql@thegatelys.com> (raw)

Hi folks,

I know I'm doing something wrong here but cannot make it work no matter how
many/few quotes I use<g>

I'm trying to reference a column in a RECORD which is not a column name but
a derived column.
Any suggestions???


Example code below to highlight the problem:

DECLARE

r_app          RECORD ;

BEGIN


FOR r_app  IN
  SELECT to_char( created_timestamp, 'DDMMYY' ) AS "joined_on",
         last_name,
         first_name
  FROM   customer
  WHERE  cust_id = 123
LOOP

    r_app.last_name ; -- Easy to referenece this value but...
    r_app.joined_on ; -- HOW do I reference this value?...this does not work


.......





view thread (2+ messages)  latest in thread

Message-ID: <GOEGKICPFOPNLIEIHGFJEEHKCCAA.postgresql@thegatelys.com>
Permalink:  ../GOEGKICPFOPNLIEIHGFJEEHKCCAA.postgresql@thegatelys.com/
Also on:    postgresql.org/message-id/GOEGKICPFOPNLIEIHGFJEEHKCCAA.postgresql@thegatelys.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: postgresql@thegatelys.com
  Subject: Re: Referring to derived column name in a RECORD
  In-Reply-To: <GOEGKICPFOPNLIEIHGFJEEHKCCAA.postgresql@thegatelys.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox