Home » Developer & Programmer » Forms » NO_DATA_FOUND??????
NO_DATA_FOUND?????? [message #79730] Fri, 05 July 2002 09:03 Go to next message
Tyler
Messages: 123
Registered: January 2002
Senior Member
Hi all,

This is a confusing one... I have a table called ACTION_ITEM_DESCRIPTION. In this table there are two fields, AIDE_CODE AND AIDE_DESCRIPTION. The data in the AIDE_CODE (PK) column is 2 or 3 characters long. These characters (AIDE_CODE) identify the description (AIDE_DESCRIPTION), I have a text list that is populated with these values, and two text fields that I want to populate with the selected values when list changed... the text list looks like this when populated...

--LIST NAME = AIDE_LST

RCR Reg Form Completed and Returned
AN Action Necessary
CLA Clarification is needed
CRC Call Registration Center
TB To Be Announced

The value behinde the text list is the PK AIDE_CODE. The trigger I have on the list is WHEN-LIST-CHANGED -

DECLARE
V_CODE VARCHAR2(3) := NAME_IN('AIDE_LST');
BEGIN
--text field one to be populated with aide_code
:aide_code_field := v_code;

--text field two, to be populated with aide_desc
select aide_description into :aide_desc from action_item_description where aide_code = v_code;

END;

PROBLEM...

When I select a three character aide_code, it populates both text fields no problem, when I select a two character aide_code, it errors with 01403 no_data_found. I can put the select statement in SQL Plus with a two character aide_code and it works fine.

Suggestions???

Thanx In Advance,

~ T ~
Re: NO_DATA_FOUND?????? [message #79737 is a reply to message #79730] Sat, 06 July 2002 02:10 Go to previous messageGo to next message
Subhash
Messages: 105
Registered: October 2001
Senior Member
try ...select aide_description into :aide_desc from action_item_description where aide_code = rtrim(v_code,' ');
Re: NO_DATA_FOUND?????? [message #79762 is a reply to message #79730] Tue, 09 July 2002 13:56 Go to previous message
Tyler
Messages: 123
Registered: January 2002
Senior Member
hey,

I had actually already figured it out... but you were right... good call! Who the hell stores a value in a db with a space after it? O well....

Thanx

T
Previous Topic: printing data to LTP printer
Next Topic: Executing DDL statements in Forms
Goto Forum:
  


Current Time: Thu Mar 28 16:20:33 CDT 2024