Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I use loop logic in Oracle SQL?
Use cursor and the looping commands.
<mitch23_at_hotmail.com> wrote in message news:7r6kka$4di$1_at_nnrp1.deja.com...
> I'm new to Oracle, so excuse me if this is a silly question.
>
> There is this table that stores the contents of a free-form text field
> (let's call it customer_description) that is structured a little
> strangely. There are three files in the table, a primary key
> (customerID), a counter field (record_number), and then the actual
> text field. The way this table is setup,each line item in the free
> form text field gets a single record.
>
>
> For example, if CustomerID 1234 has a 4 line Customer_description,
> there will be 4 records in this table as follows:
>
> CustomerID Record_Number Customer_Description
> ---------------------------------------------------
> 1234 1 text...
> 1324 2 ...continued text
> 1234 3 ...continued text
> 1324 4 ...continued text
> 9999 1 text...
> 9999 2 ...continued text
>
>
> How can I loop through this table so that I can concantenate the
> contents of the description field by Customer ID?
>
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Wed Sep 08 1999 - 17:53:44 CDT
![]() |
![]() |