View Full Version : Oracle 9i Merge available from OCI
Nick Palmer
01-08-2004, 02:00 PM
Hi all,
I've been reading about the 9i "merge" feature. I understand how to access
this using PL/SQL, but I'm curious. Is there a way to access this from OCI
?
We currently have merge logic in our OCI interface code to handle a merge
case, but it would be nice if I could replace this code with a direct call
to an OCI function.
Thanks,
Nick
Norman Dunbar
01-09-2004, 12:26 AM
"Nick Palmer" <nick@kcicorp.com> wrote in message news:<vvrkmijvg1q6e8@corp.supernews.com>... Hi all, I've been reading about the 9i "merge" feature. I understand how to access this using PL/SQL, but I'm curious. Is there a way to access this from OCI ?
<SNIP>
Hi Nick,
Greetings from behind the firewall :o)
I haven't tried it yet, but I'm pretty certain that all you do is
build a 'merge' statement in the same way as you would an 'insert' in
OCI, prepare, bind, define and execute as normal.
In situations like this, I like to experiment and see what happens.
Why not knock up a small test programn and try it out.
Have fun.
Norm.
PS. Looking through oci.h, under statement types there isn't a value
(in 9.2.0.3) for OCI_STMT_MERGE so I suspect it will either (a) not
work or (b) simply be an OCI_STMT_INSERT. I also did a quick Windows
Search to see if "merge" was in any of the demos - it is, but in
comment fields. I Tried looking for "merge just in case, but found
nothing. Not that Windows search is of much help - I need grep
instead.
Nick Palmer
01-13-2004, 07:38 AM
Norm, thanks for the reply.
You basically found what I found in your PS. It seems that there is no
notion of merge in any of the OCI stuff. I haven't tried doing a small
sample
because it didn't seem like there was any support for merge in OCI. Maybe
I'll give it a shot.
Nick.
"Norman Dunbar" <norman.dunbar@lfs.co.uk> wrote in message
news:3078e2fe.0401090026.1beec6c9@posting.google.com... "Nick Palmer" <nick@kcicorp.com> wrote in message
news:<vvrkmijvg1q6e8@corp.supernews.com>... Hi all, I've been reading about the 9i "merge" feature. I understand how to
access this using PL/SQL, but I'm curious. Is there a way to access this from
OCI ? <SNIP> Hi Nick, Greetings from behind the firewall :o) I haven't tried it yet, but I'm pretty certain that all you do is build a 'merge' statement in the same way as you would an 'insert' in OCI, prepare, bind, define and execute as normal. In situations like this, I like to experiment and see what happens. Why not knock up a small test programn and try it out. Have fun. Norm. PS. Looking through oci.h, under statement types there isn't a value (in 9.2.0.3) for OCI_STMT_MERGE so I suspect it will either (a) not work or (b) simply be an OCI_STMT_INSERT. I also did a quick Windows Search to see if "merge" was in any of the demos - it is, but in comment fields. I Tried looking for "merge just in case, but found nothing. Not that Windows search is of much help - I need grep instead.
Norman Dunbar
01-15-2004, 12:19 AM
Morning Nick,
"Nick Palmer" <nick@kcicorp.com> wrote in message news:<100846mbq07sh47@corp.supernews.com>...
Norm, thanks for the reply.
Welcome.
You basically found what I found in your PS. It seems that there is no notion of merge in any of the OCI stuff.
True, but .......
I haven't tried doing a small sample because it didn't seem like there was any support for merge in OCI. Maybe I'll give it a shot.
Ah well, I was bored last night in my B&B (I'm away from home) so I
fired up the trusty laptop and 'wrote' a small example - straight out
of the SQL Manual example, and, "it just works".
I didn't bother trying to determine the statement type - I leave that
as an exercise for the reader :o)
Cheers,
Norm.
Still having to Google - we are tied down tighter than a duck's bottom
here.
Don't reply to the email address it is an old one which I can't get
access to change at the moment - still, less spam that way.
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.