Re: Truncation From Unix Script

From: Paul Zola <pzola_at_us.oracle.com>
Date: 1996/07/17
Message-ID: <4sj2l5$h2g_at_inet-nntp-gw-1.us.oracle.com>#1/1


In <4shdgs$pgl_at_arl-news-svc-1.compuserve.com> Dan_Daley%FEDERAL-MOGUL_at_notesgw.CompuServe.com (Dan Daley) writes:

} I've been trying to truncate a table using a Unix script with the
} following stored
} procedure.
 [snip]
} This procedure runs fine from a SQLplus prompt but when trying to
} execute
} it from unix using the following script it fails.
}
} ---------------------------------------------------------------------------------
} PATH=/usr/bin:/dbdisk01/home/dba/oracle/product/7.1.6/bin:/bin:
} PATH=$PATH:.#
} sqlplus sys/password << EOF
} BEGIN
} EXECUTE TRUNCATE_TABLE('shraps.receiving_header');
} END;
} /
} EOF
Do one of

    sqlplus sys/password << EOF
    EXECUTE TRUNCATE_TABLE('shraps.receiving_header');     /
    EOF OR

    sqlplus sys/password << EOF
    begin
    TRUNCATE_TABLE('shraps.receiving_header');     end;
    /
    EOF Your problem is that you're doing both.

        -p



Paul Zola Technical Specialist World-Wide Technical Support

GCS H--- s:++ g++ au+ !a w+ v++ C+++ UAV++$ UUOC+++$ UHS++++$ P+>++ E-- N++ n+

    W+(++)$ M+ V- po- Y+ !5 !j R- G? !tv b++(+++) !D B-- e++ u** h f-->+ r*


Disclaimer: 	Opinions and statements are mine, and do not necessarily
		reflect the opinions of Oracle Corporation.
Received on Wed Jul 17 1996 - 00:00:00 CEST

Original text of this message