on 2017 May 04 5:38 AM
Hi.
I've started to look into procedures to handle complex calculations, rather than using PowerBuilder code. In one case, I need more than one return value from my procedure, and I have added those parameters with "OUT" in the list:
Ex.
spw_calc_cost (IN Foo integer, OUT storage numeric(13,3), OUT packing numeric(13,3), OUT freight numeric(13,3))
So the question is, can I use these values in three separate columns in my select?
SELECT ColA, ColB, spw_calc_cost(ColC, ColD, ColE), ColF = ColC + ColD + ColE FROM TableA WHERE foo = 'bar';
Wanted result:
ColA ColB ColC ColD ColE ColF Foo Bar 1.000 2.000 3.000 6.000
Or do I have to write 3 separate functions to achieve this? Or is the solution to create a RESULT return type perhaps?
regards,
Bjarne Maritech Systems AS Norway
This isn't an answer to your question, just a tip for programming in PB. Whether the dw is visible or not, until the calculations are completed set redraw off (dw.SetRedraw( False ). Once the processing is finished, turn redraw back on (dw.SetRedraw( True ) ). It's 100's of times faster.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.