Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Variable to hold a cast table??
Eidolon Ivanovich wrote:
> Hello all, i have a SPLIT function which splits a string on a
> delimeter and returns back a table type.
> In order to use the resuls, i can do:
>
> SELECT COLUMN_VALUE FROM TABLE(CAST(SPLIT(pLOTLOCs,DelimLOTLOCs) as
> TBL_VARCHAR2))
>
> What i would like to do is to create a local variable in my procedure
> to store the results of:
> TABLE(CAST(SPLIT(pLOTLOCs,DelimLOTLOCs) as TBL_VARCHAR2))
>
> So maybe i could make a variable something like
> TAB_LOTLOCs SOMETYPE := TABLE(CAST(SPLIT(pLOTLOCs,DelimLOTLOCs) as
> TBL_VARCHAR2));
>
> Then i dont have to keep doing all the spliting and casting. I could
> then just do
> SELECT COLUMN_VALUE FROM TAB_LOTLOCs.
>
> How can i do this??
>
> Thanks in advance.
This is a syntax I've not seen before nor can I find using any Oracle site or Google. Can anyone point to a reference?
Thanks.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Sat Oct 23 2004 - 15:53:53 CDT