473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Merge two cursors data (select from a cursor?)

HI,
I need to "add" data to a cursor. Since it is not updatable, I would
like to select from data union all select from my cursor: (test is a
package)

(the following fucntion is part of test package body)

function retcur(Parrec in test%rowtype, Parcur in testpack.MyCUr)
return testpack.MyCur is
TestCur testpack.MyCUr;

begin
open TestCur for select * from Parcur
union all select rec.id, rec.fname from dual;
Return TestCur;
end;

My problem is that I cannot select from Parcur cursor. Is there a way
to achive this? I don't want to create a temp table since there can be
some locking/access problems.

Thank you for your help
Christian
Jul 19 '05 #1
1 15365
cc*******@yahoo.com (Christian) wrote in message news:<99**************************@posting.google. com>...
HI,
I need to "add" data to a cursor. Since it is not updatable, I would
like to select from data union all select from my cursor: (test is a
package)

(the following fucntion is part of test package body)

function retcur(Parrec in test%rowtype, Parcur in testpack.MyCUr)
return testpack.MyCur is
TestCur testpack.MyCUr;

begin
open TestCur for select * from Parcur
union all select rec.id, rec.fname from dual;
Return TestCur;
end;

My problem is that I cannot select from Parcur cursor. Is there a way
to achive this? I don't want to create a temp table since there can be
some locking/access problems.

Thank you for your help
Christian


Hi Christian,

Did you try Global Tempoary Table there is no locking issue with this
excellent feature in oracle 8i and onward and please check if package
cursor help you.
Thanks and Regards
Khurram Naseem
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Alban Hertroys | last post by:
Oh no! It's me and transactions again :) I'm not really sure whether this is a limitation of psycopg or postgresql. When I use multiple cursors in a transaction, the records inserted at the...
4
by: bourgon | last post by:
Working on some new code, I'm coming across WHILE loops used instead of cursors. I was curious if anyone had any stats on how the speed of doing this compares to the speed of a cursor. I...
5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
3
by: schwartzenberg | last post by:
Dear friends, I have just run into a strange DB2 problem. Something i'd some of you would answer, if only shortly. My basic question is: How do i ensure 'insensitive' (ie static) cursors...
16
by: Sam Durai | last post by:
Hello, I need to merge a small table (of rows less than 100,sometimes even 0 rows) to a big table (of rows around 4 billion). I used the PK of the big table as merge key but merge does a table scan...
0
ADezii
by: ADezii | last post by:
A Cursor, in ADO, is the underlying Object that makes it possible to move around within the set of rows returned by a Recordset. The Cursor manages movement, updatability, and currency of the rows...
1
by: Christian | last post by:
HI, I need to "add" data to a cursor. Since it is not updatable, I would like to select from data union all select from my cursor: (test is a package) (the following fucntion is part of test...
3
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.