plsqldeveloper

How to sent email in Oracle PL/SQL package to multiple receivers?

喜夏-厌秋 提交于 2019-12-30 11:11:27
问题 How to sent email in Oracle PL/SQL package to multiple receivers? I have below pl/sql procedure within an oracle package, it works only for one receiver. I need to improve it functional to let it can send email to multiple receivers at same time like "To: David Festool; Peter Makita; John Dewalt". Any body can help me out will be great appreciate! Please provide me modified code. procedure email(p_recip in varchar2, p_subject in varchar2, p_message in varchar2) is c utl_smtp.connection; msg

Inserting null values when using bulk insert

回眸只為那壹抹淺笑 提交于 2019-12-25 18:29:48
问题 I have one table: CREATE TABLE cust ( cust_id NOT NULL, cust_name NOT NULL, address NULL ); I have to insert these rows into another table: CREATE TABLE 1cust_det ( cust_id NOT NULL, cust_name NOT NULL, address NOT NULL ); Unfortunately the cust.address column contains NULL values. I want to insert these rows from cust to 1cust_det using a cursor. What do I have to do? 回答1: INSERT INTO cust_det SELECT cust_id, cust_name, COALESCE(address, 'UNKNOWN') FROM cust 回答2: If you have access to change

Facing issue in parsing a tag in xml through pl/sql

巧了我就是萌 提交于 2019-12-25 13:14:34
问题 I am looking to find a way to get a tag value through simple extract() or extractvalue() command, however I am unable to do so. create table foo( xml_response XMLTYPE ); insert into foo values('<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns0:CSXWEBSVResponse xmlns:ns0="http://tempuri.org

PL/SQL arabic displayed as?

假如想象 提交于 2019-12-25 07:43:08
问题 When I query for data that have arabic text in PL/SQL Developer, It is showed as question marks (????). I am sure the data is correctly stored in DB because it shows on website properly, also on the server. So I think it is a problem related to my PL/SQL Developer (v8.0.4.1514). Is there any way to change how PL/SQL Developer shows/encodes arabic text? How to check in what format/encoding the arabic text is stored? My question might be missing some details, So Just ask me and also keep in

generate XML from oracle tables

…衆ロ難τιáo~ 提交于 2019-12-25 02:06:53
问题 Need to create one generic stored procedure which will take table name as input parameter and create xml file with below format. Xml file name should be table name. <XML> <TABLENAME></TABLENAME> <RECORDS> <RECORD> <COLNAME>AAA</COLNAME> <COLNAME>AAA</COLNAME> <RECORD> <RECORD> <COLNAME>AAA</COLNAME> <COLNAME>AAA</COLNAME> <RECORD> <RECORD> <COLNAME>AAA</COLNAME> <COLNAME>AAA</COLNAME> <RECORD> <RECORD> <COLNAME>AAA</COLNAME> <COLNAME>AAA</COLNAME> <RECORD> <RECORD> <COLNAME>AAA</COLNAME>

Assinging a number to binding variable pl/sql

不羁岁月 提交于 2019-12-24 19:47:40
问题 I am trying to assign a number value to a binding variable for a pl/sql assignment and it is giving me the error : Error report: ORA-01403: no data found ORA-06512: at line 15 01403. 00000 - "no data found" Cause: Action: b_emp_id ------ b_emp_id And the code VARIABLE b_emp_id NUMBER DECLARE v_emp_id employees.employee_id%TYPE; v_FIRST_NAME employees.first_name%TYPE; v_LAST_NAME employees.last_name%TYPE; v_JOB_ID employees.job_id%TYPE; v_HIRE_DATE employees.hire_date%TYPE; v_message VARCHAR2

How to revert old plsql?

╄→гoц情女王★ 提交于 2019-12-23 04:53:35
问题 yesterday i altered a procedure "MAIL_INSERT_CRON". but now i want my old procedure back.. It is possible to retrive old content of my procedure ? 回答1: You can recover the code from the view all_source if: you have flashback on, you have the privilege to use flashback on data dictionary views (which is granted by the SELECT_CATALOG_ROLE role), the data is still in the flashback area. It seems you don't have flashback on, or the data has been overwritten already. In that case you'll have to

Running a PL/SQL procedure in a Perl script

倾然丶 夕夏残阳落幕 提交于 2019-12-23 00:28:09
问题 I have a Perl script which takes a file as input and has PL/SQL (for statements and DBMS_OUTPUT.PUT_LINE ) in it. I need to run make a database connection and run that file in Perl script.The pl/sql has Begin declare end section,with for statements on it which is writing data of 3 columns separated using commas(DBMS_OUTPUT.PUT_LINE) I have shown what I have tried below. Is it correct? my $dbh = DBI->connect( "dbi:Oracle:$db", $username, $passwd ) || die( $DBI::errstr . "\n" ); $dbh->

pragma autonomous_transaction in a trigger

巧了我就是萌 提交于 2019-12-21 17:52:28
问题 I have written a trigger on one table which deletes data from other table upon a condition. The trigger has pragma autonomous_transaction, and trigger works as intended. However, I do wonder if there can be any problems in future, say if data is inserted by multiple users/sources at the same time etc...Any suggestions? Source table t1: -------------------------------------------- | user_id | auth_name1 | auth_name2 | data | -------------------------------------------- | 1 | Name1 | Name2 | d1

How to parse comma delimited string in PL/SQL? [duplicate]

*爱你&永不变心* 提交于 2019-12-20 10:29:13
问题 This question already has answers here : How to convert comma separated values to rows in oracle? (4 answers) Closed last year . I have a comma delimited string in a PL/SQL script (e.g. data:= 'a,b,c,d,e'), that I need to parse out within the script. I would like to loop through the string and process each item. Like a 'foreach' loop. Is this possible in PL/SQL? Can someone point me to some code? 回答1: If you are on Oracle 10G or 11G then you should have a built-in Apex function apex_util