I Just Love this list.. No matter what you can get diverse answers to
which one can always apply the one that best fits the needs at the time.
Thanks for all the responces. I kinda figured out after some more
testing that I was going to have to produce a loop/cursor and that is
the way that worked. I am going to look into Larry's suggestion. It
really sounds intriguing.
Thanks
Jim Limburg
Jim Limburg wrote:
>
> G-Day all
>
> I started out this morning to do what I thought a simple thing. To build
> a sub-select statement that would return into a variable the values in a
> column that are not null and distinct even if it is in the column more
> than once..
>
> I want the variable to contain 6090,7010,4050,1320,1590 ... and so on...
>
> The data in the columns is text/12 and here is what I attempted so far.
>
> SELECT gl_acct INTO vg_gl_acct FROM gl_pur_01 WHERE gl_acct IN +
> (SELECT gl_acct FROM gl_pur_01 where gl_acct is not null and limit=1)
>
> Thanks
> Jim Limburg