<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Update syntax in native SQL (MS SQL) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822900#M660332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the below links ,syntax will vary depend upon database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.itcserver.com/blog/2006/06/26/open-sql-vs-native-sql/" target="test_blank"&gt;http://www.itcserver.com/blog/2006/06/26/open-sql-vs-native-sql/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2007 14:22:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-21T14:22:12Z</dc:date>
    <item>
      <title>Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822899#M660331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I have successfully SELECTed data from an external MS SQL database through ABAP code using native sql, however I cannot update back that table in MS SQL. The following code seems to succeed as sy-subrc returns 0 after the UPDATE's execution however nothing is actually updated in the external DB table. The entry that I am trying to update exists in the external table and no exception is raised. Might that be a problem of authorization? The user I use to connect to the external MS SQL DB has full access to the z_dummy table. (at least, that's what the admins told me....).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I would appreciate (and of course reward) any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TRY.&lt;/P&gt;&lt;P&gt;        EXEC SQL.&lt;/P&gt;&lt;P&gt;          update z_dummy set key1 = :itab-key1,&lt;/P&gt;&lt;P&gt;                             text1 = :itab-text1,&lt;/P&gt;&lt;P&gt;                             flag1 = :itab-flag1,&lt;/P&gt;&lt;P&gt;                             flag2 = :itab-flag2&lt;/P&gt;&lt;P&gt;                where key1 = :itab-key1&lt;/P&gt;&lt;P&gt;        ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;          WRITE:/ itab-key1, ' was updated.' COLOR COL_POSITIVE.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;          WRITE:/ itab-key1, ' update failed' COLOR COL_NEGATIVE.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      CATCH cx_sy_native_sql_error.&lt;/P&gt;&lt;P&gt;        WRITE:/ itab-key1, ' update failed' COLOR COL_NEGATIVE.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;    ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 13:58:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822899#M660331</guid>
      <dc:creator>George_Lioumis</dc:creator>
      <dc:date>2007-09-21T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822900#M660332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the below links ,syntax will vary depend upon database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.itcserver.com/blog/2006/06/26/open-sql-vs-native-sql/" target="test_blank"&gt;http://www.itcserver.com/blog/2006/06/26/open-sql-vs-native-sql/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 14:22:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822900#M660332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T14:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822901#M660333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a thought - try an explicit COMMIT WORK AND WAIT if the update is successful (SY-SUBRC = 0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that doesn't work, try putting it just before ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 14:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822901#M660333</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-21T14:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822902#M660334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  It finally worked using an explicit COMMIT WORK AND WAIT after the whole update process of the external DB. Actually, I am not yet quite sure why it worked (!!!) as, if I am not wrong, the MSSQL has not an explicit commit. When you send an update query, it just updates the table. Furthermore, I noticed that before explicitly sending the COMMIT WORK, the update was taking quite a long time to finish in the external DB. After writing the COMMIT WORK AND WAIT though, the statement was executed immediately and the external DB was updated at once! Anyway, problem solved and thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full reward points!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy coding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 09:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822902#M660334</guid>
      <dc:creator>George_Lioumis</dc:creator>
      <dc:date>2007-10-19T09:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822903#M660335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah - sometimes you just have to kick the can enough times until it goes where you want it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway - glad it worked out for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2007 13:45:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822903#M660335</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-19T13:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822904#M660336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem but at least you can update the external database. Me I cant update the database. I'm using native sql to access and update informix database from within abap but it gives me a short dumb. The error points to the UPDATE line on this following code. Is there somethig I'm doing wrong? Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  EXEC SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    UPDATE ar_transaction SET ar_process_dt = :'X'&lt;/P&gt;&lt;P&gt;     WHERE process_seq_no = :input_itab-process_seq_no&lt;/P&gt;&lt;P&gt;       and server_id      = :input_itab-server_id&lt;/P&gt;&lt;P&gt;       and process_cnt    = :input_itab-process_cnt&lt;/P&gt;&lt;P&gt;       and ar_process_dt = :''&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDEXEC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2008 12:24:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822904#M660336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-27T12:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822905#M660337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;Could you pls send me the  native MSSQL code using SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raghuram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Apr 2008 16:02:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822905#M660337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-03T16:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822906#M660338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;Could you pls send me the native MSSQL code using SELECT statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 16:07:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822906#M660338</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-08T16:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update syntax in native SQL (MS SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822907#M660339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just want to thank you. You've been very helpful to my interface issue. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/536/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Feb 2014 08:24:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-syntax-in-native-sql-ms-sql/m-p/2822907#M660339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-02-04T08:24:35Z</dc:date>
    </item>
  </channel>
</rss>

