Hi All,
#!/bin/ksh
call_sql ()
{
sql=$1
sqlplus -s $sqlparam_sieb <<EOF
SET ECHO OFF;
SET NEWPAGE NONE;
SET SQLBL OFF;
SET VERIFY OFF;
SET LINESIZE 2000;
SET PAGESIZE 500;
SET TRIMS ON;
SET HEADING OFF;
SET FEEDBACK OFF;
SET WRAP OFF;
$sql;
EOF
}
reslt=$(call_sql "select NVL(error_message,'No Error'), count(1) from siebstg.stg_aa_member_profile_int group by error_message order by count(1) desc")
echo with quotes
echo "$reslt"
echo without quotes
echo $reslt
And below is the output what i get ...
with quotes
No Error 240
*PSC* 11
*NNF* 10
*MEM* 8
*FNM* 1
*DTE* 1
without quotes
No Error 240 *PSC* 11 *NNF* 10 *MEM* 8 *FNM* 1 *DTE* 1
I need the output it in below format..
No Error 240
*PSC* 11
*NNF* 10
*MEM* 8
*FNM* 1
*DTE* 1