simple shell script insert [message #296200] |
Fri, 25 January 2008 01:42 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
#!bin/bash
sqlplus -s treas/treas <<EOF
DECLARE
I NUMBER := 1;
BEGIN
LOOP
INSERT INTO A
VALUES (I);
I := I + 1;
EXIT WHEN I > 10;
END LOOP;
END;
EXIT;
EOF
The script runs
but it is not inserting the records.
What modification needs to be done?
[Updated on: Fri, 25 January 2008 01:43] Report message to a moderator
|
|
|
|
|
Re: simple shell script insert [message #296212 is a reply to message #296200] |
Fri, 25 January 2008 01:58 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Ok got it.
Its plsql code. it needs a "/" to execute.
#!bin/bash
sqlplus -s treas/treas <<EOF
DECLARE
I NUMBER := 1;
BEGIN
LOOP
INSERT INTO A
VALUES (I);
I := I + 1;
EXIT WHEN I > 10;
END LOOP;
COMMIT;
END;
/
EXIT;
EOF
|
|
|
|
|
Re: simple shell script insert [message #296244 is a reply to message #296200] |
Fri, 25 January 2008 04:35 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
I have saved my shell script with .sh extension in desktop.
If i have to run the script,the normal course of action is
--opening the terminal
--sh file.sh
but iwant to execute the script on double clicking the script itself.
|
|
|
|
Re: simple shell script insert [message #296247 is a reply to message #296200] |
Fri, 25 January 2008 04:54 |
varu123
Messages: 754 Registered: October 2007
|
Senior Member |
|
|
Quote: | Hii
If U are using unix or Linux as Backend
then it is not possible by double clicking it..
u have to run it by
#./yourscript.sh
If Graphical mode ,It can be possible
|
Thats understood.
How to do in graphical mode?
|
|
|
|