{1 - 24} GreyGrey
{25 - 49} GreenGreen
{50 - 499} BlueBlue
{500 - 4999} OrangeOrange
{5000 - 24999} RedRed
{25000+} BlackBlack

Please confirm that you would like to report this for an admin to review.


Oracle: PL/SQL eval function question

Oracle Consultant needs help regarding “PL/SQL eval function question”



Hi all,
I am not sure if I can put my problem into words, but I am going to try.

I would like to know if it is possible to come up with some sort of eval function for the following problem:

I have the following PL/SQL code in my DECLARATION part:
r_output myChildren%rowtype;

The myChildren table contains the following columns:
child1id
child1name
child1birth
child2id
child2name
child2birth
child3id
child3name
child3birth
child4id
child4name
child4birth
child5id
child5name
child5birth
child6id
child6name
child6birth
child7id
child7name
child7birth

My question is the following: How can I use a loop to set all columns to NULL with the minimum amount of code. Also r_output must be accessible from my main PL/SQL block incase I use it to set actual values in a later loop. Note the code below is not actual code but it illustrates a loop and how I want the r_output variables to be set. :)
LOOP
r_output.child(counter)id := NULL;
r_output.child(counter)name := NULL;
r_output.child(counter)birth := NULL;
END LOOP;

Hope I illustrated my problem clearly and I hope there is a solution to be able to do this. The solutions I’ve found for using some sort of eval function is using EXECUTE IMMEDIATE with a BEGIN and END CLAUSE. Problem is that I can’t access it from my main PL/SQL block then. :(

Thanks for any help. :)

Edited by: user10148486 on 25-okt-2012 6:10

Edited by: user10148486 on 25-okt-2012 6:11


Consultant, needs help regarding PL/SQL eval function questionHelp!

Oracle Discussion Forums : Thread List – Oracle Database



Confirm that you would like to Remove Email Alerts for your question. You cant undo this and you will not be able to re-subscribe.


Tags

No Answers

You must be Logged In to Answer this Question

Already a Member, Log In
Not a member yet? Sign Up

Categories

Sponsors


oracle forum