<?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: Issue with VIEW and SELECT statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488968#M227787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of a view, you can also INNER JOIN statements. &lt;/P&gt;&lt;P&gt;In your select queries make sure all the key fields meet the where condition and be more specific on your conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Aug 2006 09:50:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-12T09:50:48Z</dc:date>
    <item>
      <title>Issue with VIEW and SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488966#M227785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a scenario where when we run a SELECT SINGLE query on a database view , the system hangs and subsequently doesn't give us a response. &lt;/P&gt;&lt;P&gt;The View is a Z.. view and is made of 4 base tables , which are ADRC,VBPA,VTTP and VTTK. The database view has approximately 8 million records. &lt;/P&gt;&lt;P&gt;When we run a SELECT SINGLE * INTO WA WHERE (CONDITION) query on the database view the system behaves randomly i.e. for few entries in the WHERE clause the query runs without any hic-ups. And on occasions the system hangs up and because of time-out , the program terminates. &lt;/P&gt;&lt;P&gt;Can some one please let me know why is the view and SELECT query behaving is such a way ? &lt;/P&gt;&lt;P&gt;Will appreciate anyones help !!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Aug 2006 09:26:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488966#M227785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-12T09:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with VIEW and SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488967#M227786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Couple of things to note.&lt;/P&gt;&lt;P&gt; Select single should be specified with all the key fields. Are you specifying all the key fields while using select single?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Why are you using select single * ? do you want all the fields of the view? Choose only those fields which are really required.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; r u using the select single within a Loop? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Run a SE30 analysis and see where the problem is.&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Aug 2006 09:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488967#M227786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-12T09:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with VIEW and SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488968#M227787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of a view, you can also INNER JOIN statements. &lt;/P&gt;&lt;P&gt;In your select queries make sure all the key fields meet the where condition and be more specific on your conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Aug 2006 09:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488968#M227787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-12T09:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with VIEW and SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488969#M227788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;welcome to SDN.&lt;/P&gt;&lt;P&gt;Well,while using SELECT SINGLE you need to specify all the key fields inorder to fetch the record uniquley..&lt;/P&gt;&lt;P&gt;You can also use INNER JOIN instead of Views in your scenario...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark all useful answers..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Aug 2006 09:58:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488969#M227788</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-08-12T09:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with VIEW and SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488970#M227789</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;Thanks for your responses.&lt;/P&gt;&lt;P&gt;But I still have an issue here. Let me answere your queries.. :&lt;/P&gt;&lt;P&gt;1. Select single is not being used in a loop.&lt;/P&gt;&lt;P&gt;2. The actual query is as follows :&lt;/P&gt;&lt;P&gt;  select single * from ZMM_PENANG_1B&lt;/P&gt;&lt;P&gt;  into general_info&lt;/P&gt;&lt;P&gt;  where tknum =  shipping.&lt;/P&gt;&lt;P&gt;Now the DATABASE VIEW contains multiple entries against one "shipping" number. Hence when   the select query runs it picks up the first entry from  the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is , that the query and the code have been running nicelly for the last 2 years in our production system. But suddenly for the last 2 days it is hanging up, that also NOT ALWAYS. Issue happens Intermittentlly. As i said earlier the View contains 8 million records.&lt;/P&gt;&lt;P&gt;Hope this info helps.&lt;/P&gt;&lt;P&gt; Please advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Aug 2006 10:44:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488970#M227789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-12T10:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with VIEW and SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488971#M227790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Check with your Basis administrator to see if there are any automated update stats job running on the base tables that are part of the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We faced somewhat similar condition when the (DB13) daily automated update stats job in SAP (4.7 x110) ran and it collected stats on the table and its "primary index" only. This led the (Oracle) cost based optimizer to choose a different path when executing the same query and resulted in longer run-times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yuva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 20:30:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-view-and-select-statement/m-p/1488971#M227790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T20:30:42Z</dc:date>
    </item>
  </channel>
</rss>

