Unix Technical Forum

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

This is a discussion on SELECT INTO CAUSE THE ERROR ORA-1403 EVEN THE DATA IS THERE IN THE TABLE within the Oracle Database forums, part of the Database Server Software category; --> Hi There, The following query sometime returns ORA-1403: SELECT apptype, appupath, appuname, appvalue INTO :type, :upath, :uname, :value INDICATOR ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-25-2008, 03:23 AM
kadam.milind@gmail.com
 
Posts: n/a
Default SELECT INTO CAUSE THE ERROR ORA-1403 EVEN THE DATA IS THERE IN THE TABLE

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 = ath

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com