Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > question about searching

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-28-03, 23:08
champoy champoy is offline
Registered User
 
Join Date: May 2003
Posts: 1
question about searching

Below is my code. My problem is that it shows what I am searching for, but then it also shows all the records in the table. How can I fix this?


PROCEDURE GET_SEARCH_REQDATE (temp_reqdate in DATE) IS
CURSOR cr_sir(c_sir_date_req DATE) IS
SELECT SIR_TRANS_NO, SIR_TYPE,SIR_STATUS, SIR_COMPANY, SIR_REQUEST_DATE, SIR_REPORTED_BY,
SIR_DESCRIPTION
FROM SIR
WHERE SIR_REQUEST_DATE = c_sir_date_req;
--ORDER BY SIR_TRANS_NO;
cl_sir cr_sir%ROWTYPE;
BEGIN
OPEN cr_sir(temp_reqdate);
LOOP
FETCH cr_sir into cl_sir;
IF cr_sir%FOUND THEN
GO_BLOCK('SIR_SEARCH');
IR_SEARCH.SIR_TRANS_NO := cl_sir.SIR_TRANS_NO;
IR_SEARCH.SIR_TYPE := cl_sir.SIR_TYPE;
IR_SEARCH.SIR_STATUS := cl_sir.SIR_STATUS;
IR_SEARCH.SIR_COMPANY := cl_sir.SIR_COMPANY;
IR_SEARCH.SIR_REQUEST_DATE := cl_sir.SIR_REQUEST_DATE;
IR_SEARCH.SIR_REPORTED_BY := cl_sir.SIR_REPORTED_BY;
IR_SEARCH.SIR_DESCRIPTION := cl_sir.SIR_DESCRIPTION;
next_record;
END IF;
EXIT WHEN cr_sir%NOTFOUND;
END LOOP;
CLOSE cr_sir;
END;
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On