Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: pl/sql function
"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> writes:
> "Tim Cross" <tcross_at_nospam.une.edu.au> wrote in message
> news:8765z88tn4.fsf_at_blind-bat.une.edu.au...
> > "Peter" <depend3_at_yahoo.com> writes:
> >
> > > Is it possible to return two values when you write a function without
> > > concat? If yes, how do you do this?
> > > Thanks.
> > As far as I know, you can only return one "thing" - however that
> > "thing" could be a record which contains multiple other "things" - so
> > if you need to return two (or more) distinct values, define a record
> > which represents the values to be returned, put those values in the
> > record and return that.
> >
> > Alternatively, make one of the values you want to return an IN OUT
> > parameter to the function call and put one value in that parameter and
> > return the other.
>
> The latter of which is definitely programming with side-effects, and as this
> usually results in hard-to-debug programs, should be considered bad
> programming practice. If you want to make a gordian knot of your programs,.
> fine with me, but please don't recommend this to others.
>
Well, just a few comments -
Finally, while you are certainly entitled to your opinions regarding the "correct" way to do things and you are free to criticise advice given by others in this newsgroup, you do not have the right to tell me what I should or should not recommend to others. The amount of information provided by posters looking for solutions is often sketchy at best and it is often impossible to judge what is the best solution to their problem. I will continue to provide whatever suggestions I can think of as solutions to posted problems - it is up to the reader to decide on the merits of any suggestions provided in these newsgroups. I don't claim to be any sort of expert. My only motivation is to try and put back into a resource which I've found useful. If I see a question and believe I might be able to assist by either providing possible solutions, suggestions on where to find solutions or whatever, I will continue to do so, irrespective of the opinions of self-appointed group moderators who believe they have the right to try and dictate some sort of minimal technical standard which must be met before you can reply to posts in this "open" forum.
Tim
-- Tim Cross E-Mail: tcross_at_pobox.une.edu.au Analyst/Programmer Phone: 6773 3210 Applications Group Mobile: 0412 969193 University of New England --- find / -iname microsoft -exec rm -rf {} \;Received on Mon Jul 22 2002 - 19:36:35 CDT