If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
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, 22: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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On