<?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: Requirement Gathering for report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22380#M3964</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless I am missing something, your data tables and desired output (as shown in your initial post) don't match.&lt;/P&gt;&lt;P&gt;Given the data you provided I only find the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;﻿&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="background-color: #eef4f9; border-style: solid; border-color: #cccccc; margin-top: 1px; margin-bottom: 1px; float: none; width: 362px; border-width: 1px; padding: 3px;"&gt;&lt;TBODY&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD class="xl63" height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="82"&gt;Type&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price1&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price2&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price3&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price4&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Insurance&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table3&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;P&gt;Val.table4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Catastrophe&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table4&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Risk&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table4&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Man Made&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Natural&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table3&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table4&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Health&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if there is more data, or if the above table is actually correct, or if I simply don't understand what you are trying to accomplish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Jan 2012 18:20:50 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-01-01T18:20:50Z</dc:date>
    <item>
      <title>Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22377#M3961</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 to prepare an adhoc report like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 362px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="82"&gt;Type&lt;/TD&gt;&lt;TD class="xl63" width="70"&gt;Price1&lt;/TD&gt;&lt;TD class="xl63" width="70"&gt;Price2&lt;/TD&gt;&lt;TD class="xl63" width="70"&gt;Price3&lt;/TD&gt;&lt;TD class="xl63" width="70"&gt;Price4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Insurance&lt;/TD&gt;&lt;TD&gt;Val.table1&lt;/TD&gt;&lt;TD&gt;Val.table2&lt;/TD&gt;&lt;TD&gt;Val.table3&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Val.table4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Catastrophe&lt;/TD&gt;&lt;TD&gt;Val.table2&lt;/TD&gt;&lt;TD&gt;Val.table4&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Risk&lt;/TD&gt;&lt;TD&gt;Val.table1&lt;/TD&gt;&lt;TD&gt;Val.table2&lt;/TD&gt;&lt;TD&gt;Val.table3&lt;/TD&gt;&lt;TD&gt;Val.table4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Man Made&lt;/TD&gt;&lt;TD&gt;Val.table1&lt;/TD&gt;&lt;TD&gt;Val.table3&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Natural&lt;/TD&gt;&lt;TD&gt;Val.table1&lt;/TD&gt;&lt;TD&gt;Val.table2&lt;/TD&gt;&lt;TD&gt;Val.table3&lt;/TD&gt;&lt;TD&gt;Val.table4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Health&lt;/TD&gt;&lt;TD&gt;Val.table2&lt;/TD&gt;&lt;TD&gt;Val.table4&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what I am confused about is how to prepare the dataset for something like this. I have an approach in mind like to&amp;nbsp; Create temp tables using SQL joins and then use them something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp1 as select a.val1,b.name from table1 left join comm_table b on a.key=b.key where b.name in ('Insurance,Risk,Man Made,Natural);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp2 as select a.val2,b.name from tabel2 left join comm_table b on a.key=b.key where b.name in ('Insurance,Catastrophe,Risk,Health);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp3 as select a.val3,b.name from table3 left join comm_table b on a.key=b.key where b.name in ('Insurance,Risk,Natural);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp4 as select a.val4,b.name from table4 left join comm_table b on a.key=b.key where b.name in ('Insurance,Catastrophe,Risk,Natural);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;/P&gt;&lt;P&gt;set temp1 temp2 temp3 temp4;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I thinking in correct direction??? because this set statement will produce the missing values for remaining variables so I am in fix to how to create the final dataset. Can somebody come up with better approach. May be just one SQL statement and then how to go about producing report like this. Should I go for PROC Report or in this case one should go for data _null_ reporting. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Dec 2011 19:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22377#M3961</guid>
      <dc:creator>yash82</dc:creator>
      <dc:date>2011-12-31T19:36:02Z</dc:date>
    </item>
    <item>
      <title>Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22378#M3962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have to provide more info.&amp;nbsp; What are tables 1, 2, 3 and 4 and what is in comm_table?&amp;nbsp; Unless I am missing something, it looks like a single proc sql step with a case statement might suffice, but one can only guess without knowing what is actually involved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Dec 2011 19:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22378#M3962</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-12-31T19:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22379#M3963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art&amp;nbsp; Please find Tables as below and SQL statements I think we should use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="713"&gt;&lt;TBODY&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl66" colspan="2" height="20" style="height: 15pt; width: 101pt;" width="135"&gt;Table1&lt;/TD&gt;&lt;TD class="xl65" style="width: 62pt;" width="82"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl66" colspan="2" style="width: 84pt;" width="112"&gt;Table2&lt;/TD&gt;&lt;TD class="xl65" style="width: 48pt;" width="64"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl66" colspan="2" style="width: 96pt;" width="128"&gt;Table3&lt;/TD&gt;&lt;TD class="xl65" style="width: 48pt;" width="64"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl66" colspan="2" style="width: 96pt;" width="128"&gt;Table4&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD class="xl67" height="20" style="height: 15pt; border-top: medium none;"&gt;Id1&lt;/TD&gt;&lt;TD class="xl67" style="border-top: medium none; border-left: medium none;"&gt;Price1&lt;/TD&gt;&lt;TD class="xl65"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: medium none;"&gt;Id2&lt;/TD&gt;&lt;TD class="xl67" style="border-top: medium none; border-left: medium none;"&gt;Price2&lt;/TD&gt;&lt;TD class="xl65"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: medium none;"&gt;Id3&lt;/TD&gt;&lt;TD class="xl67" style="border-top: medium none; border-left: medium none;"&gt;Price3&lt;/TD&gt;&lt;TD class="xl65"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-top: medium none;"&gt;Id4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: medium none; border-left: medium none;"&gt;Price4&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD align="right" class="xl68" height="20" style="height: 15pt; border-top: medium none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;100&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;130&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;500&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;900&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;13&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD align="right" class="xl68" height="20" style="height: 15pt; border-top: medium none;"&gt;24&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;300&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;131&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;600&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;24&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;1100&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;45&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;52&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD align="right" class="xl68" height="20" style="height: 15pt; border-top: medium none;"&gt;45&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;400&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;132&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;700&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;114&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;567&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;56&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;63&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 15pt;"&gt;&lt;TD align="right" class="xl68" height="20" style="height: 15pt; border-top: medium none;"&gt;72&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;882&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;135&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;44&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none;"&gt;777&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: medium none; border-left: medium none;"&gt;784&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="322"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" colspan="5" height="20" width="322"&gt;Common&amp;nbsp; Table&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Name&lt;/TD&gt;&lt;TD&gt;Key1&lt;/TD&gt;&lt;TD&gt;Key2&lt;/TD&gt;&lt;TD&gt;Key3&lt;/TD&gt;&lt;TD&gt;Key4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Insurance&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;TD align="right"&gt;130&lt;/TD&gt;&lt;TD align="right"&gt;9&lt;/TD&gt;&lt;TD align="right"&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Catastrophe&lt;/TD&gt;&lt;TD align="right"&gt;32&lt;/TD&gt;&lt;TD align="right"&gt;131&lt;/TD&gt;&lt;TD align="right"&gt;10&lt;/TD&gt;&lt;TD align="right"&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Risk&lt;/TD&gt;&lt;TD align="right"&gt;24&lt;/TD&gt;&lt;TD align="right"&gt;132&lt;/TD&gt;&lt;TD align="right"&gt;11&lt;/TD&gt;&lt;TD align="right"&gt;56&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Man Made&lt;/TD&gt;&lt;TD align="right"&gt;45&lt;/TD&gt;&lt;TD align="right"&gt;133&lt;/TD&gt;&lt;TD align="right"&gt;12&lt;/TD&gt;&lt;TD align="right"&gt;68&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Natural&lt;/TD&gt;&lt;TD align="right"&gt;72&lt;/TD&gt;&lt;TD align="right"&gt;134&lt;/TD&gt;&lt;TD align="right"&gt;114&lt;/TD&gt;&lt;TD align="right"&gt;777&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Health&lt;/TD&gt;&lt;TD align="right"&gt;74&lt;/TD&gt;&lt;TD align="right"&gt;135&lt;/TD&gt;&lt;TD align="right"&gt;128&lt;/TD&gt;&lt;TD align="right"&gt;754&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp1 as select a.price1,b.name from table1 left join comm_table b on a.id1=b.key1 where b.name in ('Insurance,Risk,Man Made,Natural);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp2 as select a.price2,b.name from tabel2 left join comm_table b on a.id2=b.key2 where b.name in ('Insurance,Catastrophe,Risk,Health);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp3 as select a.price3,b.name from table3 left join comm_table b on a.id3=b.key3 where b.name in ('Insurance,Risk,Natural);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp4 as select a.price4,b.name from table4 left join comm_table b on a.id4=b.key 4where b.name in ('Insurance,Catastrophe,Risk,Natural);&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2012 07:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22379#M3963</guid>
      <dc:creator>yash82</dc:creator>
      <dc:date>2012-01-01T07:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22380#M3964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless I am missing something, your data tables and desired output (as shown in your initial post) don't match.&lt;/P&gt;&lt;P&gt;Given the data you provided I only find the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;﻿&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="background-color: #eef4f9; border-style: solid; border-color: #cccccc; margin-top: 1px; margin-bottom: 1px; float: none; width: 362px; border-width: 1px; padding: 3px;"&gt;&lt;TBODY&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD class="xl63" height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="82"&gt;Type&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price1&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price2&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price3&lt;/TD&gt;&lt;TD class="xl63" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;" width="70"&gt;Price4&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Insurance&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table3&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;P&gt;Val.table4&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Catastrophe&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table4&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Risk&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table4&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Man Made&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Natural&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table1&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table3&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table4&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border-style: initial; border-color: inherit; border-collapse: collapse; border: inherit; border-width: inherit;"&gt;&lt;TD height="20" style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Health&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;Val.table2&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD style="border-color: inherit; border: inherit; padding: 3px; margin: 1px;"&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if there is more data, or if the above table is actually correct, or if I simply don't understand what you are trying to accomplish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2012 18:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22380#M3964</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-01T18:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22381#M3965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually following 5 are my tables&lt;/P&gt;&lt;P&gt;Table1&lt;BR /&gt;Id1 Price1&lt;BR /&gt;12 100&lt;BR /&gt;24 300&lt;BR /&gt;45 400&lt;BR /&gt;72 882&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2&lt;BR /&gt;Id2 Price2&lt;BR /&gt;130 500&lt;BR /&gt;131 600&lt;BR /&gt;132 700&lt;BR /&gt;135 44&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table3&lt;BR /&gt;Id3 Price3&lt;BR /&gt;9 900&lt;BR /&gt;24 1100&lt;BR /&gt;114 567&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table4&lt;BR /&gt;Id4 Price4&lt;BR /&gt;13 20&lt;BR /&gt;45 52&lt;BR /&gt;56 63&lt;BR /&gt;777 784&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Common&amp;nbsp; Table&lt;BR /&gt;Name Key1 Key2 Key3 Key4&lt;BR /&gt;Insurance 12 130 9 13&lt;BR /&gt;Catastrophe 32 131 10 45&lt;BR /&gt;Risk 24 132 11 56&lt;BR /&gt;Man Made 45 133 12 68&lt;BR /&gt;Natural 72 134 114 777&lt;BR /&gt;Health 74 135 128 754&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2012 19:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22381#M3965</guid>
      <dc:creator>yash82</dc:creator>
      <dc:date>2012-01-01T19:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22382#M3966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Those are the same tables that you posted previously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your original post you indicated that the last line of your desired table, the one labeled "Health", had values for price1 and price2, namely val.table2 and val.table4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where do those two figures come from given the data you supplied?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2012 19:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22382#M3966</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-01T19:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22383#M3967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Art, I am sorry for the typeo. What I meant by val.table2 is value of price2 for Health from table2 in a nutshell it should be value(price2) . The first post was just hurried one. So my final report should be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 320px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="64"&gt;Type &lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Price1&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Price2&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Price3&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Price4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Insurance&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD align="right"&gt;500&lt;/TD&gt;&lt;TD align="right"&gt;900&lt;/TD&gt;&lt;TD align="right"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Catastrophe&lt;/TD&gt;&lt;TD align="right"&gt;500&lt;/TD&gt;&lt;TD align="right"&gt;20&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Risk&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;TD align="right"&gt;600&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD align="right"&gt;63&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Man Made&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Natural &lt;/TD&gt;&lt;TD align="right"&gt;882&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD align="right"&gt;567&lt;/TD&gt;&lt;TD align="right"&gt;784&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;Health&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD align="right"&gt;44&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in my price1 for Insurance val.table1 means value off price1 from table1 where table1.id1=commontable.key1. Thanks a lot for going all the way out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2012 20:16:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22383#M3967</guid>
      <dc:creator>yash82</dc:creator>
      <dc:date>2012-01-01T20:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22384#M3968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still get different results than your latest example, and I'm certain that the following can be optimized, but I think that it achieves what you are trying to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Table1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Id1 Price1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;100&lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;300&lt;/P&gt;&lt;P&gt;45&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;400&lt;/P&gt;&lt;P&gt;72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;882&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Table2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Id2 Price2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;130&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;500&lt;/P&gt;&lt;P&gt;131&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;600&lt;/P&gt;&lt;P&gt;132&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;700&lt;/P&gt;&lt;P&gt;135&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;44&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Table3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Id3 Price3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;9 900&lt;/P&gt;&lt;P&gt;24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1100&lt;/P&gt;&lt;P&gt;114&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;567&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Table4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Id4 Price4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&lt;/P&gt;&lt;P&gt;45 52&lt;/P&gt;&lt;P&gt;56&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;63&lt;/P&gt;&lt;P&gt;777&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;784&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;data comm_Table;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat Name $11.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Name &amp;amp; Key1-Key4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;Insurance&amp;nbsp; 12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;130&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;13&lt;/P&gt;&lt;P&gt;Catastrophe&amp;nbsp; 32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;131&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;45&lt;/P&gt;&lt;P&gt;Risk&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;132&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;56&lt;/P&gt;&lt;P&gt;Man Made&amp;nbsp; 45&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;133&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;68&lt;/P&gt;&lt;P&gt;Natural&amp;nbsp; 72&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;134&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;114&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;777&lt;/P&gt;&lt;P&gt;Health&amp;nbsp; 74&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;135&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;128&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;754&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table temp1 as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select a.price1,b.name from table1 a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join comm_table b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.id1=b.key1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where b.name in ("Insurance","Risk","Man Made","Natural");&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table temp2 as &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select a.price2,b.name from table2 a &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join comm_table b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.id2=b.key2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where b.name in ("Insurance","Catastrophe","Risk","Health");&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table temp3 as select a.price3,b.name from table3 a &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join comm_table b&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.id3=b.key3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where b.name in ("Insurance","Risk","Natural");&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table temp4 as &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select a.price4,b.name from table4 a &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join comm_table b &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on a.id4=b.key4 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where b.name in ("Insurance","Catastrophe","Risk","Natural");&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value $types&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Insurance"=1&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Catastrophe"=2&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Risk"=3&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Man Made"=4&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Natural"=5&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Health"=6&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set temp1-temp4;&lt;/P&gt;&lt;P&gt;&amp;nbsp; type=put(name,$types.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct type,name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(price1) as price1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(price2) as price2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(price3) as price3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(price4) as price4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from final&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by type&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by type&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2012 20:26:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22384#M3968</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-01T20:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22385#M3969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still do not understand what you want.&amp;nbsp; It looks to me like you have four lookup tables for four prices.&amp;nbsp; (no idea what the four different prices represent)&amp;nbsp; You could easily build a single SQL query using LEFT JOINs to combine the five tables into one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;data table1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id1 price1 @@ ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;12 100 24 300 45 400 72 882&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data table2 ; input id2 price2 @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;130 500 131 600 132 700 135 44&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data table3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id3 price3 @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;9 900 24 1100 114 567&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data table4 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id4 price4 @@;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;13 20 45 52 56 63 777 784&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data common;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length name $15 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input name &amp;amp; key1-key4 ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;Insurance&amp;nbsp; 12 130 9 13&lt;/P&gt;&lt;P&gt;Catastrophe&amp;nbsp; 32 131 10 45&lt;/P&gt;&lt;P&gt;Risk&amp;nbsp; 24 132 11 56&lt;/P&gt;&lt;P&gt;Man Made&amp;nbsp; 45 133 12 68&lt;/P&gt;&lt;P&gt;Natural&amp;nbsp; 72 134 114 777&lt;/P&gt;&lt;P&gt;Health&amp;nbsp; 74 135 128 754&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc sql noprint ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; select c.name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , t1.price1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , t2.price2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , t3.price3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , t4.price4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; from common c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join table1 t1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on c.key1=t1.id1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join table2 t2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on c.key2=t2.id2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join table3 t3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on c.key3=t3.id3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; left join table4 t4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on c.key4=t4.id4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where c.name in ('Insurance','Catastrophe','Risk','Natural')&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;proc print; run;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp; name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; price1&amp;nbsp;&amp;nbsp;&amp;nbsp; price2&amp;nbsp;&amp;nbsp;&amp;nbsp; Price3&amp;nbsp;&amp;nbsp;&amp;nbsp; Price4 &lt;/P&gt;&lt;P&gt; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Insurance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 900&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catastrophe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 600&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 52&lt;/P&gt;&lt;P&gt; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Risk&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 300&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 700&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 63&lt;/P&gt;&lt;P&gt; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Natural&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 882&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 567&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 784&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your output seems to have the values shifted to the left instead of staying in the variables that represent the original lookup table that they came from.&amp;nbsp; Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jan 2012 23:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22385#M3969</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-01-01T23:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Requirement Gathering for report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22386#M3970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Art and Tom... Both the methods solved my purpose....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 17:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Requirement-Gathering-for-report/m-p/22386#M3970</guid>
      <dc:creator>yash82</dc:creator>
      <dc:date>2012-01-04T17:46:40Z</dc:date>
    </item>
  </channel>
</rss>

