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: Looping through attributes

Re: Looping through attributes

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 24 Sep 2004 10:35:22 -0400
Message-ID: <TKmdncxtFNFYrcncRVn-gA@comcast.com>

"Sean Byrne" <byrne_sean_spamtrap_at_hotmail.com> wrote in message news:cj1aju$ame$1$8302bc10_at_news.demon.co.uk...
| Hi,
|
| I'm trying to write some PL-SQL that manipulates a set of attributes
| with a similar name.
|
| What's the correct way of writing
|
| FOR i in 0..5
| loop
| ls_att = '[ATTRIBUTE ' || i || ']'
| ...
|
| so that it returns the value in the database for ATTRIBUTE 1 etc ratrher
| than assigning the string [ATTRIBUTE 1} etc to ls_att?
|
| Cheers,
| Sean

what exactly do you mean by attribute? if you're referring to a column of a table (seems to be, based on 'value in database' reference) then you need to SELECT values into PL/SQL variables.

you probably want to look at the Chapter 6 'Interaction Between PL/SQL and Oracle' in the PL/SQL User's Guide and Reference (http://tahiti.oracle.com)

++ mcs Received on Fri Sep 24 2004 - 09:35:22 CDT

Original text of this message

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