pl/sql problem
Date: Thu, 30 Jul 1998 16:40:47 +0300
Message-ID: <35C077DF.1C82B886_at_nxx.nokia.com>
Hi!
[Quoted] I am quite new with pl/sql and I am asking how to do this:
I am reading a file using UTL_FILE, from that file I should get
parameters to SELECT clause (WHERE something = something_from_the_file).
How do I send these values to SELECT clause. Output should be more than
just one line from the query.
I am trying with something like this:
DECLARE
file_in UTL_FILE.FILE_TYPE;
file_out UTL_FILE.FILE_TYPE;
my_var NUMBER;
line_buf VARCHAR2(1023);
line_out VARCHAR2(1023);
BEGIN
file_in := UTL_FILE.FOPEN('/directory', ' my_file.txt', 'r');
LOOP
UTL_FILE.GET_LINE(file_in, line_buf);
-- some lines to get out my_var (they work just fine)
--IF line includes something i want THEN
SELECT something
INTO line_out
FROM somewere
WHERE something_else = my_var;
[Quoted] UTL_FILE.GET_LINE(file_out, line_out);
END LOOP;
......
Everything else seems to be fine except that select-thing.
Thanks for advance
Marko
Received on Thu Jul 30 1998 - 15:40:47 CEST