<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[ORAERP.COM - The Knowledge Center for Oracle ERP Professionals - Looking Beyond the Possibilities - SQL & PL/SQL]]></title>
		<link>http://www.oraerp.com/</link>
		<description><![CDATA[ORAERP.COM - The Knowledge Center for Oracle ERP Professionals - Looking Beyond the Possibilities - http://www.oraerp.com]]></description>
		<pubDate>Wed, 19 Jun 2013 08:58:37 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[SQL Plus Commands]]></title>
			<link>http://www.oraerp.com/Thread-SQL-Plus-Commands</link>
			<pubDate>Thu, 17 Feb 2011 09:21:41 -0600</pubDate>
			<guid isPermaLink="false">http://www.oraerp.com/Thread-SQL-Plus-Commands</guid>
			<description><![CDATA[SQL*Plus commands allow a user to manipulate and submit SQL statements. Specifically, they enable a user to: <br />
<br />
Enter, edit, store, retrieve, and run SQL statements <br />
List the column definitions for any table <br />
Format, perform calculations on, store, and print query results in the form of reports <br />
Access and copy data between SQL databases <br />
The following is a list of SQL*Plus commands and their functions. The most commonly used commands are emphasized in italics: <br />
<br />
<span style="font-weight: bold;">/ - Execute the current SQL statement in the buffer - same as RUN </span>ACCEPT - Accept a value from the user and place it into a variable <br />
APPEND - Add text to the end of the current line of the SQL statement in the buffer <br />
AUTOTRACE - Trace the execution plan of the SQL statement and gather statistics <br />
BREAK - Set the formatting behavior for the output of SQL statements <br />
BTITLE - Place a title on the bottom of each page in the printout from a SQL statement <br />
CHANGE - Replace text on the current line of the SQL statement with new text <br />
CLEAR - Clear the buffer <br />
COLUMN - Change the appearance of an output column from a query <br />
COMPUTE - Does calculations on rows returned from a SQL statement <br />
CONNECT - Connect to another Oracle database or to the same Oracle database under a different user name <br />
COPY - Copy data from one table to another in the same or different databases <br />
DEL - Delete the current line in the buffer <br />
DESCRIBE - List the columns with datatypes of a table <br />
EDIT - Edit the current SQL statement in the buffer using an external editor such as vi or emacs <br />
EXIT - Exit the SQL*Plus program <br />
GET - Load a SQL statement into the buffer but do not execute it <br />
HELP - Obtain help for a SQL*Plus command (In some installations) <br />
HOST - Drop to the operating system shell <br />
INPUT - Add one or more lines to the SQL statement in the buffer <br />
LIST - List the current SQL statement in the buffer <br />
QUIT - Exit the SQL*Plus program <br />
REMARK - Place a comment following the REMARK keyword <br />
RUN - Execute the current SQL statement in the buffer <br />
SAVE - Save the current SQL statement to a script file <br />
SET - Set a variable to a new value <br />
SHOW - Show the current value of a variable <br />
SPOOL - Send the output from a SQL statement to a file <br />
START - Load a SQL statement located in a script file and then run that SQL statement <br />
TIMING - Used to time the execution of SQL statements for performance analysis <br />
TTITLE - Place a title on the top of each page in the printout from a SQL statement <br />
UNDEFINE - Delete a user defined variable]]></description>
			<content:encoded><![CDATA[SQL*Plus commands allow a user to manipulate and submit SQL statements. Specifically, they enable a user to: <br />
<br />
Enter, edit, store, retrieve, and run SQL statements <br />
List the column definitions for any table <br />
Format, perform calculations on, store, and print query results in the form of reports <br />
Access and copy data between SQL databases <br />
The following is a list of SQL*Plus commands and their functions. The most commonly used commands are emphasized in italics: <br />
<br />
<span style="font-weight: bold;">/ - Execute the current SQL statement in the buffer - same as RUN </span>ACCEPT - Accept a value from the user and place it into a variable <br />
APPEND - Add text to the end of the current line of the SQL statement in the buffer <br />
AUTOTRACE - Trace the execution plan of the SQL statement and gather statistics <br />
BREAK - Set the formatting behavior for the output of SQL statements <br />
BTITLE - Place a title on the bottom of each page in the printout from a SQL statement <br />
CHANGE - Replace text on the current line of the SQL statement with new text <br />
CLEAR - Clear the buffer <br />
COLUMN - Change the appearance of an output column from a query <br />
COMPUTE - Does calculations on rows returned from a SQL statement <br />
CONNECT - Connect to another Oracle database or to the same Oracle database under a different user name <br />
COPY - Copy data from one table to another in the same or different databases <br />
DEL - Delete the current line in the buffer <br />
DESCRIBE - List the columns with datatypes of a table <br />
EDIT - Edit the current SQL statement in the buffer using an external editor such as vi or emacs <br />
EXIT - Exit the SQL*Plus program <br />
GET - Load a SQL statement into the buffer but do not execute it <br />
HELP - Obtain help for a SQL*Plus command (In some installations) <br />
HOST - Drop to the operating system shell <br />
INPUT - Add one or more lines to the SQL statement in the buffer <br />
LIST - List the current SQL statement in the buffer <br />
QUIT - Exit the SQL*Plus program <br />
REMARK - Place a comment following the REMARK keyword <br />
RUN - Execute the current SQL statement in the buffer <br />
SAVE - Save the current SQL statement to a script file <br />
SET - Set a variable to a new value <br />
SHOW - Show the current value of a variable <br />
SPOOL - Send the output from a SQL statement to a file <br />
START - Load a SQL statement located in a script file and then run that SQL statement <br />
TIMING - Used to time the execution of SQL statements for performance analysis <br />
TTITLE - Place a title on the top of each page in the printout from a SQL statement <br />
UNDEFINE - Delete a user defined variable]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Bulk and reference cursor]]></title>
			<link>http://www.oraerp.com/Thread-Bulk-and-reference-cursor</link>
			<pubDate>Fri, 24 Dec 2010 08:16:27 -0600</pubDate>
			<guid isPermaLink="false">http://www.oraerp.com/Thread-Bulk-and-reference-cursor</guid>
			<description><![CDATA[I simulated a sample procedure for my requirement. When i try to compile procedure it throws error 'cannot mix single and multiple rows ( bulk) into'...I have to pass a table as dynamic in a cursor ,collect the data and process it using and forall ...Please help me<br />
create or replace PROCEDURE proc_1(t_name varchar2) IS<br />
TYPE parent_rec IS RECORD (part_num dynamic.emp_name%type,part_name dynamic.emp_id%type,part_id dynamic.tel_no%type) ;<br />
p_rec parent_rec;<br />
<br />
rec_array SYS_REFCURSOR;<br />
<br />
BEGIN<br />
OPEN rec_array FOR 'select EMP_NAME, EMP_ID,TEL_NO FROM '||t_name ||' WHERE EMP_ID = ''1''' ;<br />
LOOP<br />
FETCH rec_array BULK COLLECT INTO p_rec.part_num, p_rec.part_name, p_rec.part_id LIMIT 500;<br />
FORALL i IN p_rec.first..p_rec.last<br />
INSERT INTO dynamic_1(emp_name_1,emp_id_1,tel_no_1) VALUES (p_rec.part_num(i), p_rec.part_name(i),p_rec.part_id(i));<br />
<br />
EXIT WHEN rec_array%NOTFOUND;<br />
END LOOP;<br />
COMMIT;<br />
CLOSE rec_array;<br />
END proc_1;]]></description>
			<content:encoded><![CDATA[I simulated a sample procedure for my requirement. When i try to compile procedure it throws error 'cannot mix single and multiple rows ( bulk) into'...I have to pass a table as dynamic in a cursor ,collect the data and process it using and forall ...Please help me<br />
create or replace PROCEDURE proc_1(t_name varchar2) IS<br />
TYPE parent_rec IS RECORD (part_num dynamic.emp_name%type,part_name dynamic.emp_id%type,part_id dynamic.tel_no%type) ;<br />
p_rec parent_rec;<br />
<br />
rec_array SYS_REFCURSOR;<br />
<br />
BEGIN<br />
OPEN rec_array FOR 'select EMP_NAME, EMP_ID,TEL_NO FROM '||t_name ||' WHERE EMP_ID = ''1''' ;<br />
LOOP<br />
FETCH rec_array BULK COLLECT INTO p_rec.part_num, p_rec.part_name, p_rec.part_id LIMIT 500;<br />
FORALL i IN p_rec.first..p_rec.last<br />
INSERT INTO dynamic_1(emp_name_1,emp_id_1,tel_no_1) VALUES (p_rec.part_num(i), p_rec.part_name(i),p_rec.part_id(i));<br />
<br />
EXIT WHEN rec_array%NOTFOUND;<br />
END LOOP;<br />
COMMIT;<br />
CLOSE rec_array;<br />
END proc_1;]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Send sms]]></title>
			<link>http://www.oraerp.com/Thread-Send-sms</link>
			<pubDate>Thu, 07 Oct 2010 03:39:44 -0500</pubDate>
			<guid isPermaLink="false">http://www.oraerp.com/Thread-Send-sms</guid>
			<description><![CDATA[DB 10g<br />
procedure is as....<br />
Create or Replace Procedure SEND_SMS<br />
( p_sender in varchar2,<br />
p_recipient in varchar2,<br />
p_message in varchar2)<br />
as<br />
mailcon utl_smtp.connection;<br />
begin<br />
mailcon :=utl_smtp.open_connection('mail.thxis..com');<br />
utl_smtp.helo(mailcon,'mail.thxis..com');<br />
utl_smtp.mail(mailcon,p_sender);<br />
utl_smtp.rcpt(mailcon,p_recipient );<br />
utl_smtp.data(mailcon,'From: ' ||p_sender|| utl_tcp.crlf||<br />
'To: ' || p_recipient ||utl_tcp.crlf ||<br />
'Subject: SMS From Database' || utl_tcp.crlf ||<br />
p_message);<br />
utl_smtp.quit(mailcon);<br />
end;<br />
<br />
<br />
executing as<br />
exec SEND_SMS('test@thxis.com', '9921182989@ideacellular.net','This is my first SMS');<br />
<br />
getting error as<br />
ORA-30678: too many open connections<br />
ORA-06512: at "SYS.UTL_TCP", line 17<br />
ORA-06512: at "SYS.UTL_TCP", line 246<br />
ORA-06512: at "SYS.UTL_SMTP", line 115<br />
ORA-06512: at "SYS.UTL_SMTP", line 138<br />
ORA-06512: at "APPS.SEND_SMS", line 8<br />
ORA-06512: at line 1<br />
<br />
<br />
at which position i get wrong....<br />
by using same process mail going correctly but sms is not going it throwing error]]></description>
			<content:encoded><![CDATA[DB 10g<br />
procedure is as....<br />
Create or Replace Procedure SEND_SMS<br />
( p_sender in varchar2,<br />
p_recipient in varchar2,<br />
p_message in varchar2)<br />
as<br />
mailcon utl_smtp.connection;<br />
begin<br />
mailcon :=utl_smtp.open_connection('mail.thxis..com');<br />
utl_smtp.helo(mailcon,'mail.thxis..com');<br />
utl_smtp.mail(mailcon,p_sender);<br />
utl_smtp.rcpt(mailcon,p_recipient );<br />
utl_smtp.data(mailcon,'From: ' ||p_sender|| utl_tcp.crlf||<br />
'To: ' || p_recipient ||utl_tcp.crlf ||<br />
'Subject: SMS From Database' || utl_tcp.crlf ||<br />
p_message);<br />
utl_smtp.quit(mailcon);<br />
end;<br />
<br />
<br />
executing as<br />
exec SEND_SMS('test@thxis.com', '9921182989@ideacellular.net','This is my first SMS');<br />
<br />
getting error as<br />
ORA-30678: too many open connections<br />
ORA-06512: at "SYS.UTL_TCP", line 17<br />
ORA-06512: at "SYS.UTL_TCP", line 246<br />
ORA-06512: at "SYS.UTL_SMTP", line 115<br />
ORA-06512: at "SYS.UTL_SMTP", line 138<br />
ORA-06512: at "APPS.SEND_SMS", line 8<br />
ORA-06512: at line 1<br />
<br />
<br />
at which position i get wrong....<br />
by using same process mail going correctly but sms is not going it throwing error]]></content:encoded>
		</item>
	</channel>
</rss>