Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

ORA-00904: invalid identifier

$
0
0
I've been trying to debug this for 3 hours now. TAB is a table where it contains all the table names. If I try to run it without the filter 'where' it runs fine and outputs the number of rows. But when I put a filter it shows that error. I want to be able to know if the table exists, if it doesn't, create it. But I'm stuck here..

Code:

#bin/ksh

OUTPUT=$(sqlplus -s ABC31/ABC31@ALPHA01 << EOF
        set echo off feed off heading off tab off pagesize 0 trimspool on linesize 500
        SELECT COUNT(*) from tab where tname = 'SAMPLE_TABLE';
exit;
EOF)

echo $OUTPUT

ORA-00904: "SAMPLE_TABLE": invalid identifier

Moderator's Comments:
Use code tags, thanks.

Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images