<?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: SQL Abap brain teaser in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776412#M1677843</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;If TRAVEL must be linked to RESORT through ROUTE then how could there be records with just RESORT and TRAVEL?&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;Maybe I've not been clear ... you're right : it's impossible to have resort without route.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;If I make a big query binding ZTRAVEL to ZROUTE and ZROUTE twice to ZRESORT &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;I use twice ZRESORT in join ... the problem is not that..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2012 08:24:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-06-22T08:24:55Z</dc:date>
    <item>
      <title>SQL Abap brain teaser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776407#M1677838</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;I have to make a query on&amp;nbsp; following Ztables:&lt;/P&gt;&lt;P&gt;ZTRAVEL - travel data (holding route identifier)&lt;/P&gt;&lt;P&gt;ZROUTE&amp;nbsp; - route data (holding from_resort identifier and to_resort identifier)&lt;/P&gt;&lt;P&gt;ZRESORT - resort data (holding resort name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is a generic query where constraints are travel data and resort name(in ZRESORT).&lt;/P&gt;&lt;P&gt;The problem is that a TRAVEL can exist without a ROUTE (start resort + arrive resort) ... for example, a user can create a travel saving only arrive and departure date.&lt;/P&gt;&lt;P&gt;If I make a big query binding ZTRAVEL to ZROUTE and ZROUTE twice to ZRESORT (one for start resort and the other for arrive resort name) eventual travel without route assigned will be cut out. If I use an OUTER options in join I cannot set constraints on joined fields table.&lt;/P&gt;&lt;P&gt;I tried also to create a maintainance view mixing all I need ( I read that for this kind of view are closer to what I need) but the problem is that I cannot put tables in join more times (as I need for resort).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea or hint to get out of this trap ? &lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Gabriele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 12:58:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776407#M1677838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T12:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Abap brain teaser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776408#M1677839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not elegant, but you could maybe do the LEFT JOIN without the selection condition on resort name and apply it afterwards by deleting from the returned data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 13:11:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776408#M1677839</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2012-06-21T13:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Abap brain teaser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776409#M1677840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;I was curious to see if there is a solution but I don't think there is a direct way without 'tricks'.&lt;/P&gt;&lt;P&gt;I had the idea you proposed with another one with similar elegance ... put a dummy record in ZRESORT and ZROUTE so that a travel without route, will contain dummy route, which in turn, will holds dummy resort..and so join between table will no cut out rows..&lt;/P&gt;&lt;P&gt;Thank you for your reply anyway&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gabriele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 13:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776409#M1677840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T13:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Abap brain teaser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776410#M1677841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's a really strange case of the database design... If TRAVEL must be linked to RESORT through ROUTE then how could there be records with just RESORT and TRAVEL? Either we're not seeing the whole picture or it shouldn't be possible to create a record with just TRAVEL and RESORT. When designing tables, it should also be taken into consideration what kind of reports will need to be provided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, just wanted to point out that in SELECT and in ABAP queries the same table can be added more than once using an alias (JOIN AS...). Although I'd be concerned how this whole query is going to perform...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 16:49:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776410#M1677841</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2012-06-21T16:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Abap brain teaser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776411#M1677842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps I misunderstand the question, but would it be worthwhile to just split the query? Have your join that you know will eliminate any TRAVEL that doesn't have a ROUTE. Then come in behind it and select all TRAVEL where ROUTE is blank? You can select appending corresponding fields of and everyone is happy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though this seems like the simple solution and you might be able to give a more clever single-query answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 18:48:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776411#M1677842</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-21T18:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Abap brain teaser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776412#M1677843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;If TRAVEL must be linked to RESORT through ROUTE then how could there be records with just RESORT and TRAVEL?&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;Maybe I've not been clear ... you're right : it's impossible to have resort without route.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;If I make a big query binding ZTRAVEL to ZROUTE and ZROUTE twice to ZRESORT &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;I use twice ZRESORT in join ... the problem is not that..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 08:24:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-abap-brain-teaser/m-p/8776412#M1677843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-22T08:24:55Z</dc:date>
    </item>
  </channel>
</rss>

