Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-06-2012
Registered User
 
Join Date: Dec 2010
Posts: 86
Thanks: 1
Thanked 0 Times in 0 Posts
Script not executing

Hi,

am facing some problem while inserting a record into a script

Please find script below.


Code:
`sqlplus -s asdf/asdf123 <<eof!
set feedback off;
set heading off;
set verify off;

insert into <table_name>(NNI,TECH_MARKER,CURRENT_FIELD_BUILD_ID,DEFAULT_FIELD_BUILD_ID,CURRENT_EMNAME,DEFAULT_EM NAME,CURRENT_CAP_OFFSET,PA
THFINDER,BB_FIRST_FLAG) values ('$nni','$TechM','$FBI','$FBI','T_Live','T_Live','6,3,5','$pathf','$bb_first');
commit;

exit
eof!`

if [ "$scen" -eq 3 ] || [ "$scen" -eq 4 ]
then
`sqlplus -s asdf/asdf123 <<eof!
set feedback off
set heading off
set verify off

insert into <table_name>(NNI,TECH_MARKER,CURRENT_FIELD_BUILD_ID,DEFAULT_FIELD_BUILD_ID,CURRENT_EMNAME,DEFAULT_EM NAME,CURRENT_CAP_OFFSET) v
alues ('32008018','$TechM','AD-XONLY-LTS-21C','AD-XONLY-LTS-21C','T_Captive','T_Captive','7,6,5');
commit;
exit
eof!`
fi

when i try to execute am facing the following problem.

makePhDN: insert: not found
makePhDN: insert: not found


can anybody give me suggestion on this ..?

i tried google but no luck.

thanks

senthil

Last edited by methyl; 04-06-2012 at 11:11 AM.. Reason: Pleae use code tags
Sponsored Links
    #2  
Old 04-06-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Posts: 6,388
Thanks: 286
Thanked 668 Times in 640 Posts
Please post what Operating System and version you have and what Shell you are running. Please also mention what database engine and version you have.

If you get an error message, please post the whole error message. The message you post is an extract of the full error message (which would mention the name of the shell).

Assuming that the script is called makePhDN , please post the output from the following command which is designed to make control characters visible. The normal unix end-of-line will show as $ .


Code:
sed -n l makePhDN

What's this meant to mean <table_name> ?

Are all the variables starting with $ meant to be Oracle variables or unix environment variables?
Sponsored Links
    #3  
Old 04-06-2012
Registered User
 
Join Date: Jul 2008
Location: NY
Posts: 203
Thanks: 13
Thanked 39 Times in 38 Posts
and loose any empty line in your sql query
The Following User Says Thank You to 47shailesh For This Useful Post:
methyl (04-06-2012)
    #4  
Old 04-06-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Posts: 6,388
Thanks: 286
Thanked 668 Times in 640 Posts
Please also avoid double posting. It just causes confusion and reduces your chances of getting an answer.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
executing one script from other animesharma Shell Programming and Scripting 1 08-04-2011 12:38 AM
Variables of executed script available in executing script dips_ag Shell Programming and Scripting 9 05-11-2010 11:54 PM
Executing a shell script from windows;script present in unix rajneesh_kapoor UNIX for Advanced & Expert Users 4 05-08-2009 02:54 PM
Reg :Executing a script through GUI . shyam.appalla Shell Programming and Scripting 2 05-30-2008 10:56 PM
Executing ksh script from cgi hodges Shell Programming and Scripting 1 05-27-2003 10:57 AM



All times are GMT -4. The time now is 05:35 AM.