Parallelism in PL/SQL
hi how can i run one query in pl-sql- in parallel? i need all the flow... ...
hi how can i run one query in pl-sql- in parallel? i need all the flow... ...
query: SELECT A.USER_ID, A.ROLE_ID, C.SUBGROUP, MAX(A.STATUS_ID) FROM USER_ROLE A, USER B, ROLE C WHERE A.ROLE_ID = C.ROLE_ID AND C.GROUP_ID = 3 AND A.USER_ID = B.USER_ID AND B.TEMPLATE_IND = 'N' AND B.ONAP_PARTCODE IS NULL ...
Hi, I am using a PL/SQL procedure to extract Oracle tables of a particular schema to csv format. I execute the procedure by the following command: exec dump_table_to_csv ( 'schema.tablename', 'directory', 'tablename.csv'); The directory is created using the following command: CREATE DIRECTORY <directory_name> AS '<operating_system...
Hi, I'm having requirement to generate a insert script file from excel sheet. I'm partly successfully in generating script file. But i got struck in a situation,I need help from any1. My logic is some thing like this, Read first cell,check if the value in the cell already exists in DB.If not, generate an insert script as follow declar...
Hi, Recently I'm having requirement to generate script file from excel sheet. I'm able to acomplish task almost. Bu the problem is usage of Local varibales are more in script file are more.Becuase of more Local variale, During execution of script file in toad,it throws an error PL/SQL 102 Stack overflow exception during insertion script...
I am looking for a utility that will convert Oracle SQL to a string that can executed dynamically. Edit: Yes, consider this simple SQL SELECT * FROM TABLE WHERE COLUMN_NAME = 'VALUE' I have a utility which for T-SQL which converts the above SQL to a synamic SQL as follows: BEGIN DECLARE @Exe_String VarChar(2000) DECLARE @Qt ...
SHORT VERSION: What is the best way of casting "5-" as a number for storing into a table as a number? LONG VERSION: Here is the issue, I have a table I am reading from primary made up of VARCHAR2s. I am grabbing the data from some fields and storing them in another table without modification. In one field I am getting "5-" and trying to...
I have a procedure that is using a temp table. I want to get rid of the temp table and use a collection to remove I/O. it has about 5000 records. I want to insert data into this collection then I want to access the collection like: select * from table(my_type_for_gtt) I could not find an example of this. I'm confused, do I have to fi...
I'm trying to run SQL in a PL/SQL procedure. If I were to say: SELECT * FROM myTable WHERE FNAME like 'Joe%' AND dept = 'xyz'; this runs instantly. if I try putting 'Joe' in a variable it takes forever to run, about 3 minutes. Here is some syntax I found for using like with variables. PROCEDURE myProcedure(firstName IN VARCHAR, ...
I have a multithreaded process which inserts several records into a single table. The inserts are performed in a stored procedure, with the sequence being generated INTO a variable, and that variable is later used inside of an INSERT. Given that I'm not doing mysequence.nextval inside the INSERT itself, it makes me think that it is pos...
I have the line below in a .sql script. Not sure what it does. Does it wait for input from user for dbuserid and password or does it take the values from environment? What does && denote? In test.sql file I saee the line below before creating tables: CONNECT &&usr/&&pass@&&dbname ...
I have the below shell script that calls an sql script. The problem is it calls the sql script, i enter the username,password ,dbname and after that it creates the table but it doesn't exit from the sql prompt. test.sh #!/usr/bin/ksh sql_test=test.sql $ORACLE_HOME/bin/sqlplus /nolog @${sql_test} exit test.sql CONNECT &&usr/&&pa...
I have the following inside a package and it is giving me an error: ORA-14551: cannot perform a DML operation inside a query Code is: DECLARE CURSOR F IS SELECT ROLE_ID FROM ROLE WHERE GROUP = 3 ORDER BY GROUP ASC; BEGIN FOR R IN F LOOP DELETE FROM my_gtt_1; COMMIT; INSERT INTO my_gtt_1 ...
I have the following statement which compiles fine in my package: package header: TYPE role_user_type IS RECORD ( ROLE_ID some_table.ROLE_ID%TYPE, SUBGROUP some_table.USER_ID%TYPE ); body: ROLE_USER_REC MY_PACKAGE.ROLE_USER_TYPE; SELECT B.USER_ID, B.ROLE INTO ROLE_USER_REC FROM some_t...
I'm inserting a row using an Oracle stored procedure which is configured to use an autonomous transaction. I'd like to insert this record, commit that transaction, and then lock the newly-inserted record so that nobody else can modify it except my current session (in another transaction, obviously, since the one that inserted it is auto...
I have a stored procedure like this: CREATE PROCEDURE Proc_Test(testvalue set(char(1000) not null)) RETURNING int; DEFINE z char(7000); LET z = ' '; FOREACH select * into z from table(testvalue) END FOREACH; return 1; end procedure; Due to the change in the requirement I would like to change this stored procedure as:...
It happened that all projects during the last 10 years were with Oracle as a database server. Now I'm starting on a side project on my own with MySQL (the latest stable). Are there any gotchas (things that do not work as expected by an Oracle user)? Anything to do with transaction management, locking, isolation levels, indexes, that ki...
I have the below code in test.sql file. When there is a record in test_summary table everything works fine. But when there is no record inside the table it fails. I want it to continue to print the dbms_output message and process when there is no record. How can I do that? declare total_var number(20,2) := 0.0; nl_var ...
I am confronted with a 4-page SAS thing - macro? procedure? it has procedures within it, DATA blocks and PROC blocks, one PROC SQL block for importing from Oracle. Is there a tool that could translate SAS to something readable? Ideal would be SQL or PL/SQL (both seem applicable here), but almost anything procedural would be an improvem...
is it possible to send e-mail over ssl in plsql? thanks for helping. ...