Select Into problem
From: Mark Cudmore <mcudmore_at_kamloops.env.gov.bc.ca>
Date: 1998/03/06
Message-ID: <1998Mar6.141635.9992_at_vmsmail.gov.bc.ca>#1/1
SIR Now when I log on to the application with the user name of SIR, I should return a count of 1 through the above select into. I am checking to see if [Quoted] that user_id exists in the column. For the life of my I can't figure out why "counter" is returning zero, when I am expecting one??? I've been staring at that piece of code all afternoon, so I if you have any suggestions, let fly!!
Date: 1998/03/06
Message-ID: <1998Mar6.141635.9992_at_vmsmail.gov.bc.ca>#1/1
[Quoted] [Quoted] I have the following code in a Post_query trigger for the block
DECLARE
user_name varchar2(08);
criteria varchar2(10);
counter number(2);
BEGIN
--Gets the current user
[Quoted] user_name := GET_APPLICATION_PROPERTY(USERNAME);
criteria := CHR(39) || user_name || CHR(39);
--Checks to see if user is in the admin table
SELECT COUNT(*) INTO counter FROM TABLEA
WHERE user_id = criteria;
MESSAGE('Counter: ' || TO_CHAR(counter));
END; Here is the contents of the table...
USER_ID
SIR Now when I log on to the application with the user name of SIR, I should return a count of 1 through the above select into. I am checking to see if [Quoted] that user_id exists in the column. For the life of my I can't figure out why "counter" is returning zero, when I am expecting one??? I've been staring at that piece of code all afternoon, so I if you have any suggestions, let fly!!
--
Mark Cudmore
email: mcudmore_at_kamloops.env.gov.bc.ca
Received on Fri Mar 06 1998 - 00:00:00 CET