SQL Cursor : Database Object That Provisions Access to Records in a Database

learn more… | top users | synonyms

0
votes
1answer
48 views

Insert Into does not work with multiple rows

Here Is my code : CREATE OR REPLACE TRIGGER LOAN_RP AFTER INSERT OR UPDATE ON FUND_DISBURSE REFERENCING NEW AS NEW OLD AS OLD DECLARE V_FA FUND_DISBURSE.FUND_AMT%TYPE; V_RC NUMBER ...
0
votes
1answer
652 views

Oracle strong ref cursor with dynamic sql

I'm using Oracle 10g. I have a query in a stored procedure that selects entire rows from a table. Currently it returns a strongly typed ref cursor (tablename%rowtype). Now I have to add some dynamic ...
3
votes
0answers
460 views

SQL Server 2008 R2 clustered index issue

Last week, we came up with a strange issue on Clustered index. We are using SQL Server 2008 R2 in our organization. A stored procedure is written for our application which contains a cursor in it. ...
1
vote
0answers
77 views

SQL SERVER 2008 Cursor Problem

I have a table that has some missing values for certain transactions. The value for a particular transaction is going to depend on the value of all preceding transactions. Because the preceding ...
1
vote
0answers
1k views

Does MySQL close cursor if stored procedure encounters an exception?

I've seen two different approaches of cursor handling is MySQL stored procedures. Now I'm curious about their stability, due to potential MYSQLEXCEPTION risks in stored routines. Assuming, that ...
1
vote
0answers
63 views

Map records to a time interval

I have two tables: SamplesTbl contains samples every 5 seconds of a bike ride RxTbl contains the prescribed stages and other values of a bike ride SamplesTbl SamplesID int SessionNum int StageNum ...
1
vote
0answers
818 views

stored procedure returns ERROR 1305 (42000): FUNCTION does not exist

I have a stored procedure and function as below CREATE PROCEDURE ProcName() begin .... DECLARE curs CURSOR FOR select A.PList, B.nid from persons A inner join articles B on A.aid=B.id; .... ...
0
votes
0answers
32 views

Oracle Calling a Procedure Returning a CURSOR in another Procedure

I have 2 packages and a procedures that return a sysref cursor. Now i want to call either of the 2 packages and procedures in another package and procedure that will take the decision on an input ...
0
votes
0answers
52 views

Sybase ASE 12.5 on VMWare extremely slow cursors

There is a poorly written stored proc in an older Sybase 12.5 database that I need to make faster, but I can't change the code. I can change the database settings, indexes, engines, OS settings, etc. ...
0
votes
0answers
92 views

Save a dynamic cursor for reuse?

I have a search page where users can select from multiple variables. When the page is submitted to a package in the database a cursor is constructed and opened. a snippet to show what I mean ...
0
votes
0answers
503 views

FOR loop oracle query with calulation

I have a list of distinct areas, and would like to track statistics for those districts in a SQL statement. I currently have a setup that runs some summary information, but it doesn't include the ...