Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Procedure to show and spool all the results

Re: Procedure to show and spool all the results

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 25 Mar 2005 20:37:59 GMT
Message-ID: <3ajb55F68q6b1U1@individual.net>


On 2005-03-25, jackfung188_at_gmail.com <jackfung188_at_gmail.com> wrote:
> Thanks, but suppose the customer_id and product_id is not a number (eg.
> A1, A2, etc), how should I change it because I got this error
> ORA-00904: invalid column name

where customer_id = '&cust_id'

hth
Rene

>> define cust_id = &customer_id
>> spool &cust_id..csv
>> select col1||','||col2||','||col3||','||....
>> from ...
>> where customer_id = &cust_id
>> /
>> spool off
>> undefine cust_id
>>
>> define prod_id = &product_id
>> spool &prod_id..csv
>> ....
>> ....
>> spool off
>> undefine prod_id
>>
>> You will be prompted for customer_id and product_id.
>>
>> Regards
>> /Rauf
>

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Fri Mar 25 2005 - 14:37:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US