Home
All Oracle Error Codes
Oracle DBA Forum

Frequent Oracle Errors

TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated

Re: Bind variables

Leroy Kemnitz

2006-06-07

Replies:
Sorry code.  I was trying different things, here is the orig, code that doesn't work.
###########
create or replace procedure ddh_test2  as
begin
SELECT
                    uwsias.i_maj_credits_cpc.year,
                    uwsias.i_maj_credits_cpc.term,
                    uwsias.i_maj_credits_cpc.unit,
                    uwsias.i_maj_credits_cpc.unit_name,
                    uwsias.i_maj_credits_cpc.major,
                    uwsias.i_maj_credits_cpc.major_name,
                    DECODE (
                        SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3),
                        0,    0,
                        SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3    *    uwsias.i_maj_credits_cpc.cost_per_credit_lvl3)    /    SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3))    major_cpc
                FROM
                    uwsias.i_maj_credits_cpc
                WHERE
                    uwsias.i_maj_credits_cpc.year        =    :year     AND
                    uwsias.i_maj_credits_cpc.term        =    '1'        AND
                    uwsias.i_maj_credits_cpc.major    =    :major_code
                GROUP BY
                    uwsias.i_maj_credits_cpc.year,
                    uwsias.i_maj_credits_cpc.term,
                    uwsias.i_maj_credits_cpc.unit,
                    uwsias.i_maj_credits_cpc.unit_name,
                    uwsias.i_maj_credits_cpc.major,
                    uwsias.i_maj_credits_cpc.major_name;
end;
#################################

LeRoy Kemnitz wrote:
Below is a query I am trying to compile in 10.2.0.1.  I keep getting PLS-00049 Bad bind Variable.  I don't see anything wrong with this one.  Can anyone help me?


##############################################
create or replace procedure ddh_test2 as
begin
SELECT
                   uwsias.i_maj_credits_cpc.year,
                   uwsias.i_maj_credits_cpc.term,
                   uwsias.i_maj_credits_cpc.unit,
                   uwsias.i_maj_credits_cpc.unit_name,
                   uwsias.i_maj_credits_cpc.major,
                   uwsias.i_maj_credits_cpc.major_name,
                   DECODE (
                       SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3),
                       0,    0,
                       SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3    *    uwsias.i_maj_credits_cpc.cost_per_credit_lvl3)    /    SUM (uwsias.i_maj_credits_cpc.off_credits_lvl3))    major_cpc
               FROM
                   uwsias.i_maj_credits_cpc
               WHERE
                   uwsias.i_maj_credits_cpc.year        =    :year using year     AND
                   uwsias.i_maj_credits_cpc.term        =    '1'        AND
                   uwsias.i_maj_credits_cpc.major    =    :major_code using major_code
               GROUP BY
                   uwsias.i_maj_credits_cpc.year,
                   uwsias.i_maj_credits_cpc.term,
                   uwsias.i_maj_credits_cpc.unit,
                   uwsias.i_maj_credits_cpc.unit_name,
                   uwsias.i_maj_credits_cpc.major,
                   uwsias.i_maj_credits_cpc.major_name;
end;

###################################################33   



-- 
LeRoy Kemnitz
UW System Administration
Database Administrator
780 Regent Street, #246
Madison, WI 53714
Phone: (608) 265 -5775
Fax: (608) 265 - 2090