oracle-sqldeveloper

How do you get nicely formatted results from an Oracle procedure that returns a reference cursor?

蹲街弑〆低调 提交于 2019-12-17 05:08:31
问题 In MS SQL Server if I want to check the results from a Stored procedure I might execute the following in Management Studio. --SQL SERVER WAY exec sp_GetQuestions('OMG Ponies') The output in the results pane might look like this. ID Title ViewCount Votes ----- ------------------------------------------------- ---------- -------- 2165 Indexed View vs Indexes on Table 491 2 5068 SQL Server equivalent to Oracle’s NULLS FIRST 524 3 1261 Benefits Of Using SQL Ordinal Position Notation? 377 2 (3 row

How do you get nicely formatted results from an Oracle procedure that returns a reference cursor?

瘦欲@ 提交于 2019-12-17 05:08:01
问题 In MS SQL Server if I want to check the results from a Stored procedure I might execute the following in Management Studio. --SQL SERVER WAY exec sp_GetQuestions('OMG Ponies') The output in the results pane might look like this. ID Title ViewCount Votes ----- ------------------------------------------------- ---------- -------- 2165 Indexed View vs Indexes on Table 491 2 5068 SQL Server equivalent to Oracle’s NULLS FIRST 524 3 1261 Benefits Of Using SQL Ordinal Position Notation? 377 2 (3 row

how to execute a cmd in sql?

限于喜欢 提交于 2019-12-14 04:12:51
问题 I am using sys_exec but not able to find the right way to execute in right way, Please Anyone helps me that's better for me. I am using Oracle sql Following is my code. CREATE or REPLACE TRIGGER sms_trigger AFTER INSERT ON student FOR EACH ROW ENABLE DECLARE lclcmd CHAR(255); res VARCHAR(255); BEGIN lclcmd := CONCAT('php C:/xampp/htdocs/sample/sms_send.php','something'); res := sys_exec(lclcmd); END; / 回答1: You may be simply missing a space between the .php file and the parameter. With your

How to get comma separated values inside Oracle stored procedure

橙三吉。 提交于 2019-12-14 03:12:00
问题 I have to pass FlightDate , FlightNumbers as parameters to Oracle Stored procedure like below. CREATE OR REPLACE PROCEDURE GetPaxDetails( FlyingDate IN PAX_DETAILS.FlightDate%TYPE, FlightNumbers IN VARCHAR(300)) IS BEGIN -- Assume that we've received **FlightNumbers** as '0620,0712,0154' -- Basically I am trying to select all passenger details (PAX_DETAILS) -- for those flights passed in as a parameter(**FlightNumbers**) -- for the specified dates -- In this procedure the query should be

Performance Issue when Updating Table from Another Table

▼魔方 西西 提交于 2019-12-13 18:46:33
问题 I'm trying to update old customers data with new data, so basically I'm updating firstname and lastname of old_customer_source table with firstname and lastname of new_customer_source table. I indexed custid of new_customer_source but I don't have privileges to index old_customer_source's custid. Total records to updated is ~50k and they query is taking over 30 mins to run! Do you have any suggestions on how to improve the given Oracle query below? update old_customer_source t1 set (t1

how to Pass table name to PL SQL cursor dynamically?

妖精的绣舞 提交于 2019-12-13 10:52:57
问题 I have written one SQL Procedure where I have written one cursor and every time i have to pass table name to cursor query dynamically . create or replace PROCEDURE Add_DEN as v_TableName VARCHAR2(4000) := 'BO_USER_DATA'; cursor c_DEN is select * from BO_USER_DATA; // Want to pass dynamically ,now hardcoded r_DEN c_DEN%ROWTYPE; fetch c_DEN into r_DEN; v_Name := r_DEN."Name"; Can i write something like this cursor c_DEN is "select * from " || v_TableName; Any Help ? 回答1: here an example:

how to get all version and latest iteration of object in the SQL

久未见 提交于 2019-12-13 08:55:54
问题 I'm very new to SQL... I have data like below in table called versioniteration . I want build a query in SQL (oracle) to get the out as in the second table. Please guide me how to do this? Here the part get altered many times in given version, each time the changes made the iteration increases. The part can also change to new version then the Iteration will be assigned (number). | Name | Version | Iteration | |===============|===============|============| | Part 1 | A | 1 | |:----------------

SQLDeveloper Does not start in debug mode

一个人想着一个人 提交于 2019-12-13 07:40:10
问题 I'm trying to run the sql developer in debug mode and i get the following error. I turned off the firewall on the windows machine. (I think my antiviruses firewall is still turned on, i'm not sure if it causing) Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( 'xx.xx.xxx.xx', '51814' ) ORA-30683: failure establishing connection to debugger ORA-12535: TNS:operation timed out ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68 ORA-06512: at line 1 What could be causing this issue? Another Question,

Executing a stored procedure inside another stored procedure using Select Query

不想你离开。 提交于 2019-12-13 06:55:02
问题 I want to call a stored procedure on every row of a table inside my own stored procedure. In SQL Developer workspace I can simple call it like this: SELECT my_stored_proc(...) FROM my_table However in my stored procedure this doesn't seem to execute: stmt := 'SELECT my_stored_proc(...) FROM my_table'; EXECUTE IMMEDIATE stmt; This does work: DECLARE l_cursor sys_refcursor; BEGIN OPEN l_cursor FOR stmt; LOOP FETCH l_cursor INTO ...; EXIT WHEN l_cursor%NOTFOUND; my_stored_proc(...); END LOOP; ..

SQL Developer: Joining tables from connected SQL Server DB and connected Oracle DB

江枫思渺然 提交于 2019-12-13 05:23:37
问题 We are migrating from SQL Server 2005 to Oracle 11G. I have been trying to do an update to a table in Oracle using data stored in a table in SQL Server. Using SQL Developer, I have completed the following: Created a connection to the Oracle Database Created Connection name --> e9_crp Supplied User name and Pass Defined Host Name and SID I also created a connection to the SQL Server that contains the reference data Connection Name --> sql_data User Name and Pass Host and Port The connection