Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SELECT INTO CAUSE THE ERROR ORA-1403 EVEN THE DATA IS THERE IN THE TABLE

SELECT INTO CAUSE THE ERROR ORA-1403 EVEN THE DATA IS THERE IN THE TABLE

From: <kadam.milind_at_gmail.com>
Date: 29 Mar 2006 19:20:36 -0800
Message-ID: <1143688836.267421.75970@z34g2000cwc.googlegroups.com>


Hi There,

The following query sometime returns ORA-1403:

SELECT apptype, appupath, appuname, appvalue INTO :type, :upath, :uname, :value INDICATOR :value_ind FROM pdm_appdata WHERE appuser = '{Global}' AND apppath = '/DOCUMENT TYPE/CONCEPT' AND appname = 'HEARDER' AND apptype = 'VALUE';

 The same query executes successfully from sqlplus prompt. Also we can access the same data using cursors or using update query. This does not happen everytime so not reproducible everytime. There will be only one row fetched by this query. This table does not contain multiple rows for this query at all. The solution is to restart the Oracle which is not acceptable as it is production database. Please find the PL/SQL code which executes this query below. There is a single row

Can anybody please response as soon as possible? Any help will be appreciated.

int rel_appdata_get_value(char *usr, char *typ, char *pth,

      char *upth, char *nam, char *unam, char *val)

{

EXEC SQL BEGIN DECLARE SECTION;       char user[APPUSER_LEN];

      char type[APPTYPE_LEN];

      char path[APPPATH_LEN];

      char upath[APPPATH_LEN];

      char name[APPNAME_LEN];

      char uname[APPNAME_LEN];

      char value[APPVALUE_LEN];

      short value_ind;

EXEC SQL END DECLARE SECTION;       strcpy(type, "VALUE");

      strcpy(user, usr);

      strcpy(path, pth);

      strcpy(name, nam);

      EXEC SQL             SELECT

                  apptype,

                  appupath,

                  appuname,

                  appvalue

            INTO


:type,

:upath,

:uname,

:value INDICATOR :value_ind
FROM pdm_appdata WHERE appuser = :user AND apppath = :path AND appname = :name AND apptype = :type; if (SQLCODE == 0) { oraldchar(type, strlen(type)); strcpy(typ, type); oraldchar(upath, strlen(upath)); strcpy(upth, upath); oraldchar(uname, strlen(uname)); strcpy(unam, uname); if (value_ind < 0) value[0] = 0; else { oraldchar(value, strlen(value)); strcpy(val, value); } } return(make_sql_errcode(SQLCODE));

}

Thanks,
Milind Received on Wed Mar 29 2006 - 21:20:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US