This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE PROCEDURE SAMPLE_CURSOR_IN AS | |
CURSOR UFS IS | |
SELECT ID_UF, NM_UF | |
FROM UNIDADES_FEDERACAO; | |
BEGIN | |
FOR J IN UFS | |
LOOP | |
CONTENT := '{"sigla":"'|| J.ID_UF ||'","nome":"'|| J.NM_UF ||'"}'; | |
END LOOP; | |
DBMS_OUTPUT.PUT_LINE(CONTENT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select x.* | |
from ( | |
--aqui dentro vai o seu sql normalmente, com where e etc.. | |
select /*+ FIRST_ROWS(25)*/ --aqui indice de velocidade do próprio oracle | |
nu_expediente, | |
row_number() over (order by dt_documento desc, co_seq_documento) rn --ordene pelo que deseja e também por algo único | |
from tb_documento | |
) x | |
where x.rn between 1 and 25 --aqui tu pagina, a pagina dois é 26 and 50 | |
order by x.rn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
rs sys_refcursor; | |
type result is record( | |
status char(1), | |
message varchar2(250) | |
); | |
x result; | |
begin | |
procedure_returns_sys_ref_cursor(rs_out_parameter, others_parameters); | |
if rs_out_parameter is not null then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--#include file="../util/adovbs.inc"--> | |
<!--#include file="../util/un_util_objetos.asp"--> | |
<% | |
sFileName = "SAP_99999.txt" | |
Set oFileSystem = Server.CreateObject("Scripting.FileSystemObject") | |
Set oFile = oFileSystem.OpenTextFile(Server.MapPath(sFileName), 1, True) | |
sMailMsg = "" | |
Do Until oFile.AtEndOfStream | |
sMailMsg = sMailMsg & oFile.ReadLine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--#include file="../util/adovbs.inc"--> | |
<!--#include file="../util/un_util_objetos.asp"--> | |
<% | |
sFileName = "SAP_99999.html" | |
Set oFileSystem = Server.CreateObject("Scripting.FileSystemObject") | |
Set oFile = oFileSystem.OpenTextFile(Server.MapPath(sFileName), 1, True) | |
sMailMsg = "" | |
Do Until oFile.AtEndOfStream | |
sMailMsg = sMailMsg & oFile.ReadLine & vbcrlf |
OlderNewer