Tuesday, June 4, 2013

SPOOL Process in Shell Script

spoolFunc()
{
        sqlplus -s /nolog <<!!|grep -v 'Connected'
        connect ${FCP_LOGIN};
        set colsep "|"
        set term off
        set feedback off
        set HEADING off
        set pagesize 0
        set verify off
        SET echo off
        SPOOL $MSIAP_TOP/bin/success.csv;
        SELECT 'ROLLNO|'||'NAME|'||'MARKS' from dual;
        select * from student;
        Spool OFF;
        Exit;
/!!
 }
spoolFunc

No comments:

Post a Comment

Customer Credit Card Query

 select hca.cust_account_id,        hca.party_id,        hcas.party_site_id,        site_use_id,        hcsu.org_id,        hca.account_numb...