Re: The sql in Bourne shell takes long time

From: lovecreatesbea..._at_gmail.com <lovecreatesbeauty_at_gmail.com>
Date: 18 Nov 2006 05:03:04 -0800
Message-ID: <1163854984.200738.6860_at_k70g2000cwa.googlegroups.com>


Jim Smith wrote:
> In message <1163741507.528886.153510_at_e3g2000cwe.googlegroups.com>,
> "lovecreatesbea..._at_gmail.com" <lovecreatesbeauty_at_gmail.com> writes
> >
> >But neither works. How can I execute a block of plsql program in Korn
> >shell?
> >
> >[1] - inline plsql
> >
> >#...
> >
> >UMASK=`umask`
> >umask 277
> >sqlplus -s "$user"/"$pass"_at_"$sid" <<-EOF > /dev/null 2>&1
> >
> >DECLARE
> >
> >i conf_sequence.seq_val%TYPE; /* plsql extension */
> >
> >BEGIN
> >
> >SELECT seq_val
> >INTO i
> >FROM conf_sequence;
> >
> >i := i + 1;
> >
> >UPDATE conf_sequence
> >SET seq_val = i
> >WHERE sequence_id = '111';
> >
> >END;
> >
> >EOF
> >umask "$UMASK"
> >
> >#...
> >
>
> You need a / at the beginning of a line to make sqlplus run the pl/sql
> block.
>
> e.g.
>
> where sequence_i = '111';
>
> end;
> /
> EOF
Yes, thank you. I also learnt this knowledge from another post and applied it in my last post:) I forgot the author's name of that post, but I have written down his name on my notebook together with the tips in his post.

But my new question is that I am not sure whether there are bugs in the SQL statement sequence last my code. Received on Sat Nov 18 2006 - 14:03:04 CET

Original text of this message