Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum length of argument for SQL script 1

Status
Not open for further replies.

thaj

Programmer
May 13, 2002
12
AP
Hi,
I am passing an argument in a .SQL scrpit. The length of value of argument is around 210. Is it possible to send this much length as argument. Bcos, i am getting proper output becous of this. can anyone please answer?.

Regards,
Thajudheen
 
I would expect the max to be 255 what's the error?

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Hi mrn,

I am passing \"$desc"\ as an argument to the sql script Sample_CDR_Report.sql. The "desc" is a string of length 210. But, it seems that the argument not received by the sql sctipt.

sqlplus ITR_APP/IT765 @/home/modula/itprod1/Satyam/CDR_Extraction_Scripts/SQLs/Sample_CDR_Report.sql $Resp_Mon \"$desc\" $PoiCode 1> /dev/null

sql script:
-----------
I am receiving the desc argument like this.
" and description like '&2' '; "

Can you please throw some light toward this?.
 
Hi thaj,

You can write a wrapper for the SQL file and the variable should be picked up that way.

Here's an example wrapper, call the file wrap.ksh:

Code:
#!/bin/ksh
#
# This will call and run an SQL file
#

if [ $# -ne 1 ]
then
        echo "Usage: $0 <Input File Name>"
        exit 1
fi

VAR1=whatever
export VAR1

VAR2=whatever2
export VAR2

sqlplus ITR_APP/IT765 << EOF

@$1

EOF

exit

You would run it:

wrap.ksh /home/modula/itprod1/Satyam/CDR_Extraction_Scripts/SQLs/Sample_CDR_Report.sql


CDR report, must be a telecom company.

Good luck
DrD
 
Thanks DrD123 for your valuable idea. yes, It is a Telecom company.
Thaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top