<?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 SQL Select and Mapping Load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-Select-and-Mapping-Load/m-p/148759#M27002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jacob,&lt;BR /&gt;SQL doesn't know QlikView functions. You can use these functions only in LOAD. You can use preceeding load, like this:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;table1:&lt;BR /&gt;LOAD&lt;BR /&gt; field1,&lt;BR /&gt; applymap('MapName', field2) as NewField2,&lt;BR /&gt; ...&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; field1,&lt;BR /&gt; field2,&lt;BR /&gt; ...&lt;BR /&gt;FROM ...;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2009 07:05:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-07-08T07:05:07Z</dc:date>
    <item>
      <title>SQL Select and Mapping Load</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Select-and-Mapping-Load/m-p/148758#M27001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I am attempting to create a 'mapping load' inline to change the values of month numbers (1,2..) into month names (Jan, Feb..). I have other needs to but I would like to get this working first. I have not found any examples that make use of a mapping table when bringing in data from a 'SQL SELECT.' I have attempted multiply ways to bring in the 'map' as you can see by the comment fields and they have all failed. Is their a way to use the 'load' functions (MonthName for example) with a SQL table? How would I make this mapping table work for a SQL select? Is their an easier way to do this?&lt;/P&gt;&lt;P&gt;Thanks for your help and any questions you may have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//mapping table&lt;/P&gt;&lt;P&gt;&lt;I&gt;MonthMap:&lt;/I&gt;&lt;BR /&gt;MAPPING Load * Inline [&lt;BR /&gt;Month, MonthName&lt;BR /&gt;1, January&lt;BR /&gt;2, February&lt;BR /&gt;3, March&lt;BR /&gt;4, April&lt;BR /&gt;5, May&lt;BR /&gt;6, June&lt;BR /&gt;7, July&lt;BR /&gt;8, August&lt;BR /&gt;9, September&lt;BR /&gt;10, October&lt;BR /&gt;11, November&lt;BR /&gt;12, December&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;//SQL select&lt;/P&gt;&lt;P&gt;&lt;I&gt;SelectP21:&lt;/I&gt;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; total_amount,&lt;BR /&gt; customer_id,&lt;BR /&gt; commission_cost AS Commission,&lt;BR /&gt; customer_name,&lt;BR /&gt; Month(invoice_date) AS InvoiceMonth,&lt;BR /&gt; //MonthName(invoice_date) AS InvoiceMonth_Name,&lt;BR /&gt; //Applymap('MonthMap', [MonthName]) AS [InvoiceMonth_Name],&lt;BR /&gt; //daul(applymap('MonthMap', MonthName),MonthName) AS InvoiceMonth_Name,&lt;BR /&gt; //PICK(invoice_date,'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') AS InvoiceMonth_Name,&lt;BR /&gt; Year(invoice_date) AS InvoiceYear,&lt;BR /&gt; first_name,&lt;BR /&gt; last_name&lt;BR /&gt;FROM CommerceCenter.dbo.p21_sales_analysis_view;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 04:54:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Select-and-Mapping-Load/m-p/148758#M27001</guid>
      <dc:creator />
      <dc:date>2009-07-08T04:54:53Z</dc:date>
    </item>
    <item>
      <title>SQL Select and Mapping Load</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-Select-and-Mapping-Load/m-p/148759#M27002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jacob,&lt;BR /&gt;SQL doesn't know QlikView functions. You can use these functions only in LOAD. You can use preceeding load, like this:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;table1:&lt;BR /&gt;LOAD&lt;BR /&gt; field1,&lt;BR /&gt; applymap('MapName', field2) as NewField2,&lt;BR /&gt; ...&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; field1,&lt;BR /&gt; field2,&lt;BR /&gt; ...&lt;BR /&gt;FROM ...;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 07:05:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-Select-and-Mapping-Load/m-p/148759#M27002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-08T07:05:07Z</dc:date>
    </item>
  </channel>
</rss>

