thank you... I found the solution..
TYPE deneme IS REF CURSOR;
query_cv deneme;
k sys.all_objects %ROWTYPE;
query_q VARCHAR2(100) := 'select * from sys.all_objects ';
f := utl_file.fopen( 'ORALOAD', 'something.txt' , 'w');
OPEN query_cv FOR query_q;
LOOP
FETCH query_cv INTO k;
EXIT WHEN query_cv%NOTFOU ND;
User Profile
Collapse
-
Actually the tittle has to be : Can I use a variable as query ? :))Leave a comment:
-
I tried as you show but i had again errrors..
I actually want to this:
query VARCHAR2(100) := 'SELECT * FROM sysmy_table;
--instead of
--FOR k IN ( SELECT * FROM sys.my_table)
--this, then i can change the query as a input parameter.
FOR k IN ( query )
LOOP
input_string := k.my_column;
input_string := rpad(...Leave a comment:
-
can I use a query as a variable?
How can I do this?
If I use as following, there is no error;
FOR k IN (SELECT * FROM sys.my_table ) LOOP
however I want to use this FOR LOOP in a variable as following;
query VARCHAR2(100) := 'SELECT * FROM sys.all_objects ';
FOR k IN (query) LOOP
Is there any way to do this? -
SnigRO replied to write a package in pl/sql that reads a sql query, encrypt each row and write to textin Oraclefirstly, I have to get line by line sql query such as:
FOR kayit IN (SELECT * FROM sys.table_examp le )
LOOP
dbms_output.put _line('Index = ' || kayit.owner || ' ----- ' || kayit.object_na me);
END LOOP;
then i ll encrypt each row bye using DBMS_OBFUSCATIO N_TOOLKIT,
after that I have to use UTL_FILE package to write the txt file such as :
declare
f utl_file.file_t ype;...Leave a comment:
-
SnigRO started a topic write a package in pl/sql that reads a sql query, encrypt each row and write to textin Oraclewrite a package in pl/sql that reads a sql query, encrypt each row and write to text
hi to eveybody,
I wanna write a pl/sql package that has some functions
that will do this tasks..
reads a sql query, encrypt each row and write to text file in OS by order.
Is there anybody can help me?
No activity results to display
Show More
Leave a comment: