<?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: How to apply join? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22525#M789373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to concatenate with flag concept to all your Tables and see. Join is not good idea ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/39177"&gt;Understanding Join, Keep and Concatenate&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2009/11/understanding-join-and-concatenate/" title="http://qlikviewcookbook.com/2009/11/understanding-join-and-concatenate/"&gt;http://qlikviewcookbook.com/2009/11/understanding-join-and-concatenate/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Feb 2018 07:56:25 GMT</pubDate>
    <dc:creator>prma7799</dc:creator>
    <dc:date>2018-02-14T07:56:25Z</dc:date>
    <item>
      <title>How to apply join?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22520#M789368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;I want to apply join in these above two tables. How to apply? and which join should i use?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;Increment_Sales:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000; font-size: 14.6667px; font-family: 'Courier New';"&gt;SAPCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_sold&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesPrice&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;VatAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[tax amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.CashOrderTrn&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;InvoiceType&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'31'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;(CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)')&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; Increment_Returns:&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt; SAP&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Code&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesReturnNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[return no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReturnItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReturnItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReturnQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_returns&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesPrice&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.SalesReturnTrn&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;InvoiceType&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'31'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;(CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)')&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22520#M789368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply join?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22521#M789369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;why you want to join this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can Concatenate this with Flag...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A:&lt;/P&gt;&lt;P&gt;Load A,B,C,......, '&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt;Sales&lt;/SPAN&gt;' as Flag&lt;/P&gt;&lt;P&gt;from TableA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;B:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load A,B,C,....., '&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt;Return&lt;/SPAN&gt;' as Flag&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;from TableB;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 07:41:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22521#M789369</guid>
      <dc:creator>prma7799</dc:creator>
      <dc:date>2018-02-14T07:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply join?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22522#M789370</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;what is your expected output? Data from both the tables? Concatenation will be a good option&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 07:49:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22522#M789370</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-02-14T07:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply join?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22523#M789371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want to join this because I have more tables with this to join like below:-&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: red;"&gt;Inc&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;remental_Non_Etp_Sales:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;('SAPCODE_ETPCodeMapping',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,'') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ETPCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: green;"&gt;//'N_ETP SALE' as SaleType,&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SaleQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_sold&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;MRPValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;TaxAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[tax amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQl&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;Select&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.GoodsSender&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;NCode,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.InvoiceNumber,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate,SD.ItemNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SaleQuantity,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.NetValue,SD.MRPValue,SD.TaxAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SAP_Link.dbo.Sales_DataNonETP_BIReports&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.warehouse_sap_bireport&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ON&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.CustomerId&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.Warehouse&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.Doc_Type&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'ZIKE'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)'&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; Incremental_Non_Etp_Returns:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;('SAPCODE_ETPCodeMapping',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,'') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ETPCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[return no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: green;"&gt;//'N_ETP SALE' as SaleType,&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SaleQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_returns&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;MRPValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;TaxAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[tax amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQl&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;Select&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.GoodsSender&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;NCode,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.InvoiceNumber,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate,SD.ItemNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SaleQuantity,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.NetValue,SD.MRPValue,SD.TaxAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SAP_Link.dbo.Sales_DataNonETP_BIReports&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.warehouse_sap_bireport&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ON&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.CustomerId=WH.Warehouse&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.Doc_Type&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'ZIKR'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)'&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 07:50:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22523#M789371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-14T07:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply join?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22524#M789372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can concatenate by giving the flag and then use that flag in set analysis for calculation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 07:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22524#M789372</guid>
      <dc:creator>shiveshsingh</dc:creator>
      <dc:date>2018-02-14T07:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply join?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22525#M789373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to concatenate with flag concept to all your Tables and see. Join is not good idea ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/39177"&gt;Understanding Join, Keep and Concatenate&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2009/11/understanding-join-and-concatenate/" title="http://qlikviewcookbook.com/2009/11/understanding-join-and-concatenate/"&gt;http://qlikviewcookbook.com/2009/11/understanding-join-and-concatenate/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 07:56:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22525#M789373</guid>
      <dc:creator>prma7799</dc:creator>
      <dc:date>2018-02-14T07:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply join?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22526#M789374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have all theses below tables. i want to merge all the tables (&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt;Increment_Sales,&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt; Increment_Returns,&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: red;"&gt;Inc&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;remental_Non_Etp_Sales,&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt;Incremental_Non_Etp_Returns,)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 14.6667px; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 14.6667px; font-family: 'Courier New';"&gt;I want other tables(&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;Increment_Receiving_temp1, &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;Incremental_Receiving_Non_Etp,&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;Increment_Receiving_temp2,&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;Incremental_Receiving_Non_Etp_2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;/SPAN&gt; to be separated from following above tables (&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt;Increment_Sales,&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt; Increment_Returns,&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: red;"&gt;Inc&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;remental_Non_Etp_Sales,&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 14.6667px;"&gt;Incremental_Non_Etp_Returns,)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; SAP&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Code&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_sold&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesPrice&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;VatAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[tax amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.CashOrderTrn&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;InvoiceType&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'31'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;(CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)')&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; Increment_Returns:&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; SAP&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Code&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesReturnNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[return no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CreateDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReturnItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReturnItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReturnQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_returns&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesPrice&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;LocalAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.SalesReturnTrn&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;InvoiceType&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'31'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;(CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;CreateDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)')&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: green;"&gt;//store POS_Master_final into &lt;D&gt;;&lt;BR /&gt; &lt;/D&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: red;"&gt;Inc&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;remental_Non_Etp_Sales:&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 11.0pt; font-family: 'Courier New';"&gt; as &lt;/SPAN&gt; SAP&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Code&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: green;"&gt;//'N_ETP SALE' as SaleType,&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SaleQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_sold&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;MRPValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;TaxAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[tax amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQl&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;Select&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.GoodsSender&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;NCode,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.InvoiceNumber,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate,SD.ItemNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SaleQuantity,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.NetValue,SD.MRPValue,SD.TaxAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SAP_Link.dbo.Sales_DataNonETP_BIReports&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.warehouse_sap_bireport&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ON&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.CustomerId&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.Warehouse&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.Doc_Type&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'ZIKE'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)'&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; Incremental_Non_Etp_Returns:&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; SAP&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Code&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[return no]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD')) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Sold_Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: green;"&gt;//'N_ETP SALE' as SaleType,&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SaleQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_returns&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[inv value]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;MRPValue&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[sales price]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;500, '&amp;lt;500', &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;800, '500-799',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1200, '800-1199',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;1600,'1200-1599',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;2500,'1600-2499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;3500,'2500-3499',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ( &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NetValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;lt;5000,'3500-4999','&amp;gt;=5000'))))))) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Inv val Bucket]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;TaxAmount&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[tax amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQl&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;Select&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.GoodsSender&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;NCode,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.InvoiceNumber,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate,SD.ItemNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SaleQuantity,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.NetValue,SD.MRPValue,SD.TaxAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SAP_Link.dbo.Sales_DataNonETP_BIReports&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.warehouse_sap_bireport&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ON&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.CustomerId=WH.Warehouse&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.Doc_Type&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'ZIKR'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)'&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'Courier New';"&gt; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New'; font-size: 11pt;"&gt;I want below tables (all) should be kept &lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 14.6667px; font-family: 'Courier New';"&gt;&lt;STRONG&gt;separate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: black; font-family: 'Courier New'; font-size: 11pt;"&gt; from above tables&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'Courier New';"&gt; Increment_Receiving_temp1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000; font-size: 11pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; SAP&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Code&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CurrTransactionDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Received_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReceivingNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[rec number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReceivedQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_received&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.DOLine&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WHERE(CurrTransactionDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;CurrTransactionDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)')&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; Incremental_Receiving_Non_Etp:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;('SAPCODE_ETPCodeMapping',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,'') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ETPCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Received_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[rec number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SaleQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_received&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQl&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;Select&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.GoodsSender&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;NCode,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.InvoiceNumber,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate,SD.ItemNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SaleQuantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SAP_Link.dbo.Sales_DataNonETP_BIReports&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.warehouse_sap_bireport&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ON&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.CustomerId=WH.Warehouse&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.Doc_Type&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'GR'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; Increment_Receiving_temp2:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Warehouse&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ETPCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;CurrTransactionDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Received_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ReceivedQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_received&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.DOLine&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WHERE(CurrTransactionDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;CurrTransactionDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)')&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; ;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; Incremental_Receiving_Non_Etp_2:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: red; font-size: 11.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: red;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;ApplyMap&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;('SAPCODE_ETPCodeMapping',&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;NCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,'') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ETPCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;Date#&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SalesDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, 'YYYYMMDD') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;Received_Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,' ','') &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;itemnumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;ItemNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,3) &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[Season Code]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;InvoiceNumber&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;[rec number]&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; -&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;SaleQuantity&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: maroon;"&gt;quantity_received&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 11.0pt; font-family: 'Courier New';"&gt;SQl&lt;/STRONG&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;Select&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH.GoodsSender&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;NCode,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.InvoiceNumber,&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate,SD.ItemNumber,&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SaleQuantity&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;FROM&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SAP_Link.dbo.Sales_DataNonETP_BIReports&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ETPEAS.dbo.warehouse_sap_bireport&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;WH&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;ON&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.CustomerId=WH.Warehouse&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;where&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.Doc_Type&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'STN'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;'$(currentdate)'&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;and&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;SD.SalesDate&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: lime;"&gt;20130101&lt;/SPAN&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Courier New'; color: black;"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 08:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-join/m-p/22526#M789374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-14T08:20:00Z</dc:date>
    </item>
  </channel>
</rss>

