<?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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Oracle Upsert: Insert or Update</title>
	<atom:link href="http://www.themoreuknow.net/blog/blog/archive/2008/02/22/oracle-upserts-insert-or-update/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.themoreuknow.net/blog/blog/archive/2008/02/22/oracle-upserts-insert-or-update/</link>
	<description>Learning from others since 1983</description>
	<lastBuildDate>Sun, 09 May 2010 17:48:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ram</title>
		<link>http://www.themoreuknow.net/blog/blog/archive/2008/02/22/oracle-upserts-insert-or-update/comment-page-1/#comment-34414</link>
		<dc:creator>Ram</dc:creator>
		<pubDate>Mon, 10 Aug 2009 10:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.themoreuknow.net/blog/blog/archive/2008/02/22/oracle-upserts-insert-or-update/#comment-34414</guid>
		<description>Hi Could you please let me know which version of oracle supports the last example as mentioned below. I am currently using 10.2.0.3.0 but when I try to cast the datatype It is throwing an Invalid Datatype error.

PROCEDURE UPSERT_TEST_BY_MERGE_COL( p_records MY_UPSERT_TYP) IS
BEGIN    FORALL i IN 1..p_records.COUNT
        MERGE INTO MY_UPSERT_TEST_TABLE DEST
        USING( SELECT TREAT(p_records(i) AS My_Upsert_Obj) AS obj FROM DUAL ) src
            ON (DEST.ID =  src.obj.id)
        WHEN MATCHED THEN
            UPDATE SET DEST.DATA = src.obj.data
        WHEN NOT MATCHED THEN
             INSERT (id, data) VALUES( src.obj.id, src.obj.data );
END;

Thanks
Ram</description>
		<content:encoded><![CDATA[<p>Hi Could you please let me know which version of oracle supports the last example as mentioned below. I am currently using 10.2.0.3.0 but when I try to cast the datatype It is throwing an Invalid Datatype error.</p>
<p>PROCEDURE UPSERT_TEST_BY_MERGE_COL( p_records MY_UPSERT_TYP) IS<br />
BEGIN    FORALL i IN 1..p_records.COUNT<br />
        MERGE INTO MY_UPSERT_TEST_TABLE DEST<br />
        USING( SELECT TREAT(p_records(i) AS My_Upsert_Obj) AS obj FROM DUAL ) src<br />
            ON (DEST.ID =  src.obj.id)<br />
        WHEN MATCHED THEN<br />
            UPDATE SET DEST.DATA = src.obj.data<br />
        WHEN NOT MATCHED THEN<br />
             INSERT (id, data) VALUES( src.obj.id, src.obj.data );<br />
END;</p>
<p>Thanks<br />
Ram</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: priya</title>
		<link>http://www.themoreuknow.net/blog/blog/archive/2008/02/22/oracle-upserts-insert-or-update/comment-page-1/#comment-16756</link>
		<dc:creator>priya</dc:creator>
		<pubDate>Tue, 26 Aug 2008 09:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.themoreuknow.net/blog/blog/archive/2008/02/22/oracle-upserts-insert-or-update/#comment-16756</guid>
		<description>Y is forall required at first point here in this code?</description>
		<content:encoded><![CDATA[<p>Y is forall required at first point here in this code?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
