LindaRichard
Programmer
Hi,
I have a calculation routine which get its data from a view
called tmp_step. I want to make the procedure more generic.
lnRatio(1)=tmp_step.m40_39
lnRatio(2)=tmp_step.m36_39
lnRatio(3)=tmp_step.m37_39
lnRatio(4)=tmp_step.m38_39
etc...
For example, so that it can get data from either ar_step and tmp_step.
I know I can use & to replace a command
lsField=tmp_step.m40_39
lnRatio(1)=&lsField
lsField=tmp_step.m36_39
lnRatio(2)=&lsField
lsField=tmp_step.m37_39
lnRatio(3)=&lsField
lsField=tmp_step.m38_39
lnRatio(4)=&lsField
etc...
But this can lead to very long code.
Is there a way I can only replace the table name
I tried
lsTable="tmp_step"
lsRatio(1)=&lsTable+".m40_39"
etc...
but couldn't get it to work. Anybody have a suggestion?
Thanks for your help.
Linda
I have a calculation routine which get its data from a view
called tmp_step. I want to make the procedure more generic.
lnRatio(1)=tmp_step.m40_39
lnRatio(2)=tmp_step.m36_39
lnRatio(3)=tmp_step.m37_39
lnRatio(4)=tmp_step.m38_39
etc...
For example, so that it can get data from either ar_step and tmp_step.
I know I can use & to replace a command
lsField=tmp_step.m40_39
lnRatio(1)=&lsField
lsField=tmp_step.m36_39
lnRatio(2)=&lsField
lsField=tmp_step.m37_39
lnRatio(3)=&lsField
lsField=tmp_step.m38_39
lnRatio(4)=&lsField
etc...
But this can lead to very long code.
Is there a way I can only replace the table name
I tried
lsTable="tmp_step"
lsRatio(1)=&lsTable+".m40_39"
etc...
but couldn't get it to work. Anybody have a suggestion?
Thanks for your help.
Linda