<?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: Adding Date Range Variable to QVD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475289#M177470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The condition seems to be correct. Are you receiving an error?&lt;/P&gt;&lt;P&gt;If so, try writing it like this, at the end of the SQL Load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Field1,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Field2,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;FieldN&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where ([Database Name].[Posting Date] &amp;gt;= $(vStartDate)) and&amp;nbsp; ([Database Name].[Posting Date] &amp;lt;= $(vEndDate));&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL Select *&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM ...;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Nov 2013 08:58:02 GMT</pubDate>
    <dc:creator>salto</dc:creator>
    <dc:date>2013-11-04T08:58:02Z</dc:date>
    <item>
      <title>Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475288#M177469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;newbie question &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me how to&amp;nbsp; making new qvd file from SQL Database but with Date Range ?&lt;/P&gt;&lt;P&gt;what i made was : &lt;/P&gt;&lt;P&gt;1. Making new variable vStartDate and vEndDate.&lt;/P&gt;&lt;P&gt;2. Script to store to qvd file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i'm missing is :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where [Database Name].[Posting Date] &amp;gt;= $(vStartDate) and &amp;lt;= $(vEndDate);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone tell me what to do ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 08:48:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475288#M177469</guid>
      <dc:creator />
      <dc:date>2013-11-04T08:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475289#M177470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The condition seems to be correct. Are you receiving an error?&lt;/P&gt;&lt;P&gt;If so, try writing it like this, at the end of the SQL Load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Field1,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Field2,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;FieldN&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where ([Database Name].[Posting Date] &amp;gt;= $(vStartDate)) and&amp;nbsp; ([Database Name].[Posting Date] &amp;lt;= $(vEndDate));&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL Select *&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM ...;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 08:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475289#M177470</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2013-11-04T08:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475290#M177471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Salto,&lt;/P&gt;&lt;P&gt;thanks for you response . i already try that. but still got error.&lt;/P&gt;&lt;P&gt;The Error is :&lt;/P&gt;&lt;P&gt;Table Not Found.&lt;/P&gt;&lt;P&gt;STORE SalesHeader into SalesHeader.qvd (qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Reference i attached my full coding :&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/downloadBody/5264-102-1-6314/COde.TXT.txt" title="http://community.qlik.com/servlet/JiveServlet/downloadBody/5264-102-1-6314/COde.TXT.txt"&gt;http://community.qlik.com/servlet/JiveServlet/downloadBody/5264-102-1-6314/COde.TXT.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my objective is :&lt;/P&gt;&lt;P&gt;i want to put variable (DATE RANGE within Start Date And End Date)&amp;nbsp; from my textbox as my "WHERE" condition in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 09:11:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475290#M177471</guid>
      <dc:creator />
      <dc:date>2013-11-04T09:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475291#M177472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to create your variables as numeric dates. For example:&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let vStartDate = &lt;STRONG&gt;num&lt;/STRONG&gt;(addyears(today(),-1)); &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let vEndDate = &lt;STRONG&gt;num&lt;/STRONG&gt;(today());&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table1:&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;select * &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;EM&gt;from [Table Name]&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;where [Table Name].[Posting Date] beween $(vStartDate) and $(vEndDate);&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;store Table1 into Table1.qvd; &lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 09:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475291#M177472</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-11-04T09:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475292#M177473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Wassenaar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick response.&lt;/P&gt;&lt;P&gt;but still got error, can't pull the data so the table was empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i manually add some date in the the where condition, the script will ok and the data was extract in the qvd file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 09:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475292#M177473</guid>
      <dc:creator />
      <dc:date>2013-11-04T09:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475293#M177474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case make sure the dates in the variables are in the same date format your database expects. For example &lt;EM&gt;&lt;STRONG&gt;date(&lt;/STRONG&gt;today()&lt;STRONG&gt;,'DD-MM-YYYY')&lt;/STRONG&gt;&lt;/EM&gt;. Change DD-MM-YYYY to the date format of your database date field. And use single quotes around the variable expansion in the where clause: &lt;EM&gt;where [Table Name].[Posting Date] between '$(vStartDate)' and '$(vEndDate)';&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 09:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475293#M177474</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-11-04T09:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475294#M177475</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;unfortunately, it seems I cannot download your code (not authorized). Could you please post it here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 10:05:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475294#M177475</guid>
      <dc:creator>salto</dc:creator>
      <dc:date>2013-11-04T10:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475295#M177476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Salto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's te coding :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SalesHeader:&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;[No_] as OrderNo, &lt;/P&gt;&lt;P&gt;[Bill-to Customer No_] as CustNo,&lt;/P&gt;&lt;P&gt;[Payment Terms Code] as PaymentTerm, &lt;/P&gt;&lt;P&gt;[Bill-to Name] as BillName,&lt;/P&gt;&lt;P&gt;[Ship-to Name] as ShpName, &lt;/P&gt;&lt;P&gt;//[Truck Code] as TruckNo,&lt;/P&gt;&lt;P&gt;[Salesperson Code] as Sh_SlsPers,&lt;/P&gt;&lt;P&gt;[Bill-to Name] as BillTo, &lt;/P&gt;&lt;P&gt;[Ship-to Name] as ShipTo, &lt;/P&gt;&lt;P&gt;[Location Code] as Sh_Locn,&lt;/P&gt;&lt;P&gt;[Document Type] as SalesType,&lt;/P&gt;&lt;P&gt;[Posting No_] as AR_InvoiceNo,&lt;/P&gt;&lt;P&gt;[Bill-to Address] as BillToAddress,&lt;/P&gt;&lt;P&gt;[Bill-to City] as BillToCity,&lt;/P&gt;&lt;P&gt;[Ship-to Address] as ShipToAddress,&lt;/P&gt;&lt;P&gt;[Ship-to City] as ShipToCity,&lt;/P&gt;&lt;P&gt;[Ship-to Contact] as ShipToContact,&lt;/P&gt;&lt;P&gt;[Currency Code] as CurrencyCode,&lt;/P&gt;&lt;P&gt;'remark' AS Sh_Remarks,&lt;/P&gt;&lt;P&gt;YEAR([Shipment Date]) as ShippedDateY,&lt;/P&gt;&lt;P&gt;Month([Shipment Date]) as ShippedDateM,&lt;/P&gt;&lt;P&gt;[Shipment Date] as ShippedDateD,&lt;/P&gt;&lt;P&gt;YEAR([Due Date]) as DueDateY,&lt;/P&gt;&lt;P&gt;Month([Due Date]) as DueDateM,&lt;/P&gt;&lt;P&gt;[Due Date] as DueDateD,&lt;/P&gt;&lt;P&gt;YEAR([Shipment Date]) as DelDateY,&lt;/P&gt;&lt;P&gt;Month([Shipment Date]) as DelDateM,&lt;/P&gt;&lt;P&gt;[Shipment Date] as DelDateD,&lt;/P&gt;&lt;P&gt;Year([Order Date]) as OrderDateY,&lt;/P&gt;&lt;P&gt;Month([Order Date]) as OrderDateM,&lt;/P&gt;&lt;P&gt;[Order Date] as OrderDateD,&lt;/P&gt;&lt;P&gt;YEAR([Posting Date]) as PostedDateY,&lt;/P&gt;&lt;P&gt;Month([Posting Date]) as PostedDateM,&lt;/P&gt;&lt;P&gt;[Posting Date] as PostedDateD,&lt;/P&gt;&lt;P&gt;(select sum([Line Amount]) from [301 - SPM$Sales Line] where [301 - SPM$Sales Header].No_ = [301 - SPM$Sales Line].[Document No_])as TotalAmount&lt;/P&gt;&lt;P&gt;FROM dbo."301 - SPM$Sales Header" &lt;/P&gt;&lt;P&gt;where [301 - SPM$Sales Header].[Posting Date]&amp;nbsp; &amp;gt;=$(vStartDate) and &amp;lt;= $(vEndDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;RIGHT([Posting Description],13) as OrderNo, &lt;/P&gt;&lt;P&gt;[Bill-to Customer No_] as CustNo,&lt;/P&gt;&lt;P&gt;[Payment Terms Code] as PaymentTerm, &lt;/P&gt;&lt;P&gt;[Bill-to Name] as BillName,&lt;/P&gt;&lt;P&gt;[Ship-to Name] as ShpName, &lt;/P&gt;&lt;P&gt;//[Truck Code] as TruckNo,&lt;/P&gt;&lt;P&gt;[Salesperson Code] as Sh_SlsPers,&lt;/P&gt;&lt;P&gt;[Bill-to Name] as BillTo, &lt;/P&gt;&lt;P&gt;[Ship-to Name] as ShipTo, &lt;/P&gt;&lt;P&gt;[Location Code] as Sh_Locn,&lt;/P&gt;&lt;P&gt;'' as SalesType,&lt;/P&gt;&lt;P&gt;No_ as AR_InvoiceNo,&lt;/P&gt;&lt;P&gt;[Bill-to Address] as BillToAddress,&lt;/P&gt;&lt;P&gt;[Bill-to City] as BillToCity,&lt;/P&gt;&lt;P&gt;[Ship-to Address] as ShipToAddress,&lt;/P&gt;&lt;P&gt;[Ship-to City] as ShipToCity,&lt;/P&gt;&lt;P&gt;[Ship-to Contact] as ShipToContact,&lt;/P&gt;&lt;P&gt;[Currency Code] as CurrencyCode,&lt;/P&gt;&lt;P&gt;'remark' AS Sh_Remarks,&lt;/P&gt;&lt;P&gt;YEAR([Shipment Date]) as ShippedDateY,&lt;/P&gt;&lt;P&gt;Month([Shipment Date]) as ShippedDateM,&lt;/P&gt;&lt;P&gt;[Shipment Date] as ShippedDateD,&lt;/P&gt;&lt;P&gt;YEAR([Due Date]) as DueDateY,&lt;/P&gt;&lt;P&gt;Month([Due Date]) as DueDateM,&lt;/P&gt;&lt;P&gt;[Due Date] as DueDateD,&lt;/P&gt;&lt;P&gt;YEAR([Shipment Date]) as DelDateY,&lt;/P&gt;&lt;P&gt;Month([Shipment Date]) as DelDateM,&lt;/P&gt;&lt;P&gt;[Shipment Date] as DelDateD,&lt;/P&gt;&lt;P&gt;Year([Order Date]) as OrderDateY,&lt;/P&gt;&lt;P&gt;Month([Order Date]) as OrderDateM,&lt;/P&gt;&lt;P&gt;[Order Date] as OrderDateD,&lt;/P&gt;&lt;P&gt;YEAR([Posting Date]) as PostedDateY,&lt;/P&gt;&lt;P&gt;Month([Posting Date]) as PostedDateM,&lt;/P&gt;&lt;P&gt;[Posting Date] as PostedDateD,&lt;/P&gt;&lt;P&gt;(select sum([Line Amount]) from [301 - SPM$Sales Invoice Line] where [DATABASE NAME].No_ = [301 - SPM$Sales Invoice Line].[Document No_])as TotalAmount&lt;/P&gt;&lt;P&gt;FROM dbo."DATABASE NAME"&lt;/P&gt;&lt;P&gt;where [DATABASE NAME].[Posting Date] &amp;gt;= $(vStartDate) and &amp;lt;= $(vEndDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE SalesHeader into SalesHeader.qvd (qvd);&lt;/P&gt;&lt;P&gt;drop Table SalesHeader;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 10:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475295#M177476</guid>
      <dc:creator />
      <dc:date>2013-11-04T10:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475296#M177477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wassenaar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My database type was date with DD-MM-YYYY format..&lt;/P&gt;&lt;P&gt;can be other wrong in my coding?&lt;/P&gt;&lt;P&gt;thanks in advance very much.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPdate :&lt;A href="https://community.qlik.com/qlik-users/96544"&gt;G Wassenaar&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;seem to be my server date and time was MM-DD-YYYY..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;i chnage the properties of my variable ..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the error was gone but the qvd file was empty&lt;/STRONG&gt; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 10:50:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475296#M177477</guid>
      <dc:creator />
      <dc:date>2013-11-04T10:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475297#M177478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try &lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where [Database Name].[Posting Date] &amp;gt;= $(vStartDate) and &lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;[Database Name].[Posting Date]&lt;/STRONG&gt; &lt;/EM&gt;&amp;lt;= $(vEndDate);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and not &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where [Database Name].[Posting Date] &amp;gt;= $(vStartDate) and &amp;lt;= $(vEndDate);&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 11:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475297#M177478</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-11-04T11:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475298#M177479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its important to have your condition into SQL command, not LOAD because it´ll retrieve only the rows you´ll need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending your Database you shoul cast/convert your string to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;Oracle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13835633923492882" jivemacro_uid="_13835633923492882" modifiedtitle="true"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;let vStartDate = date(addyears(today(),-1),'YYYY-MM-DD');&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;let vEndDate = &lt;SPAN style="color: #3d3d3d; font-family: inherit;"&gt;&lt;EM&gt;date&lt;/EM&gt;&lt;/SPAN&gt;(today())&lt;SPAN style="color: #3d3d3d; font-family: inherit;"&gt;&lt;EM&gt;,'YYYY-MM-DD');&lt;/EM&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;Table1:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;*;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;EM&gt;select *&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;EM&gt;from [Table Name]&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;EM&gt;where [Table Name].[Posting Date] &amp;gt;= TO_DATE('$(vStartDate)','YYYY-MM-DD') and &amp;lt;= TO_DATE('$(vEndDate)','YYYY-MM-DD');&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 11:09:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475298#M177479</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-11-04T11:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475299#M177480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dario &lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update, the script already run without error&lt;/P&gt;&lt;P&gt;but the qvd was blank.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;anything something wrong... ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 11:10:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475299#M177480</guid>
      <dc:creator />
      <dc:date>2013-11-04T11:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475300#M177481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clever Anjos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Already try to use your script, but didn't work.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;thanks also for your response... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 11:29:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475300#M177481</guid>
      <dc:creator />
      <dc:date>2013-11-04T11:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475301#M177482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What kind of error? Could you post it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 11:37:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475301#M177482</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-11-04T11:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475302#M177483</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;Are you not getting any records from either of the select statements? In that case, you might want to try adding a flag to each of the select statements and storing in separate QVD's and then checking the QVD's to identify the problem area. Also, as you said that when you insert an arbitrary date range, the query fetches results, you might want to try to create the vStartDate and vEndDate variables using the makedate() function from the dates that are working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;E.g:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;If&amp;nbsp; '01-10-2013' and '31-10-2013' work for you, you could try&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let vStartDate = makedate(right('01-10-2013',4),mid('01-10-2013',4,2),left('01-10-2013',2));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let vEndDate = similarly as above for '31-10-2013'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;* you could play around with the format of the input date and adjust accordingly&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;and then&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Table1:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Select * from [Table Name]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;where [Posting Date] between '$(vStartDate)' and '$(vEndDate)';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;store Table1 into Table1.qvd;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Pritam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:04:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475302#M177483</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475303#M177484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the error said table not exist.&lt;/P&gt;&lt;P&gt;i post it again what my coding now :&lt;/P&gt;&lt;P&gt;have no error but the file not contain the data at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET ThousandSep='.';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET DecimalSep=',';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET MoneyThousandSep='.';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET MoneyDecimalSep=',';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET MoneyFormat='Rp#.##0;(Rp#.##0)';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET TimeFormat='h:mm:ss';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET DateFormat='DD/MM/YYYY';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET MonthNames='Jan;Feb;Mar;Apr;Mei;Jun;Jul;Agust;Sep;Okt;Nop;Des';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET DayNames='Sen;Sel;Rabu;Kamis;Jumat;Sabtu;Minggu';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=MBI-301DATABASE;Data Source=mbi-DATABASE01;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=MBI-TGRDIS04;Use Encryption for Data=False;Tag with column collation when possible=False];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SalesHeader:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load * ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[No_] as OrderNo, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Customer No_] as CustNo,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Payment Terms Code] as PaymentTerm, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Name] as BillName,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Name] as ShpName, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//[Truck Code] as TruckNo,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Salesperson Code] as Sh_SlsPers,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Name] as BillTo, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Name] as ShipTo, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Location Code] as Sh_Locn,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Document Type] as SalesType,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Posting No_] as AR_InvoiceNo,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Address] as BillToAddress,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to City] as BillToCity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Address] as ShipToAddress,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to City] as ShipToCity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Contact] as ShipToContact,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Currency Code] as CurrencyCode,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'remark' AS Sh_Remarks,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Shipment Date]) as ShippedDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Shipment Date]) as ShippedDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Shipment Date] as ShippedDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Due Date]) as DueDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Due Date]) as DueDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Due Date] as DueDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Shipment Date]) as DelDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Shipment Date]) as DelDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Shipment Date] as DelDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year([Order Date]) as OrderDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Order Date]) as OrderDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Order Date] as OrderDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Posting Date]) as PostedDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Posting Date]) as PostedDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Posting Date] as PostedDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(select sum([Line Amount]) from [301 - DATABASE$Sales Line] where [301 - DATABASE$Sales Header].No_ = [301 - DATABASE$Sales Line].[Document No_])as TotalAmount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM dbo."301 - DATABASE$Sales Header" &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where [301 - DATABASE$Sales Header].[Posting Date] &amp;gt;=$(vStartDate) and [301 - DATABASE$Sales Header].[Posting Date] &amp;lt;= $(vEndDate);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load *;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RIGHT([Posting Description],13) as OrderNo, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Customer No_] as CustNo,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Payment Terms Code] as PaymentTerm, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Name] as BillName,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Name] as ShpName, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//[Truck Code] as TruckNo,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Salesperson Code] as Sh_SlsPers,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Name] as BillTo, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Name] as ShipTo, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Location Code] as Sh_Locn,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'' as SalesType,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No_ as AR_InvoiceNo,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to Address] as BillToAddress,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Bill-to City] as BillToCity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Address] as ShipToAddress,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to City] as ShipToCity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Ship-to Contact] as ShipToContact,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Currency Code] as CurrencyCode,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'remark' AS Sh_Remarks,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Shipment Date]) as ShippedDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Shipment Date]) as ShippedDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Shipment Date] as ShippedDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Due Date]) as DueDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Due Date]) as DueDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Due Date] as DueDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Shipment Date]) as DelDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Shipment Date]) as DelDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Shipment Date] as DelDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year([Order Date]) as OrderDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Order Date]) as OrderDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Order Date] as OrderDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YEAR([Posting Date]) as PostedDateY,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Month([Posting Date]) as PostedDateM,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Posting Date] as PostedDateD,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(select sum([Line Amount]) from [301 - DATABASE$Sales Invoice Line] where [301 - DATABASE$Sales Invoice Header].No_ = [301 - DATABASE$Sales Invoice Line].[Document No_])as TotalAmount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM dbo."301 - DATABASE$Sales Invoice Header"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where [301 - DATABASE$Sales Invoice Header].[Posting Date] &amp;gt;= $(vStartDate) and [301 - DATABASE$Sales Header].[Posting Date] &amp;lt;= $(vEndDate);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;STORE SalesHeader into SalesHeader.qvd (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;drop Table SalesHeader;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:06:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475303#M177484</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475304#M177485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where do you define vStartDate and vEndDate? If you don't create those variables or give them values then no records can be retrieved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:09:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475304#M177485</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-11-04T12:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475305#M177486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure your tablename is &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;dbo."301 - DATABASE$Sales Invoice Header"&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Could you check this information?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475305#M177486</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-11-04T12:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475306#M177487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Pritam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for your reply.. this is the answer for my error ..&lt;/P&gt;&lt;P&gt;we need to write in the script for date range with : "BETWEEN "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besrt Regards,&lt;/P&gt;&lt;P&gt;Hermawan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:50:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475306#M177487</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Date Range Variable to QVD</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475307#M177488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear G Wassenaar and Clever Anjos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;already been answer by pritam.. thanks so much for your reply and knowledge.&lt;/P&gt;&lt;P&gt;the problem was on the condition date range. need to be entered with "BETWEEN" vStartDate and vEndDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for G Wassenaar, the variable i already key in. as they i put as text box variable.&lt;/P&gt;&lt;P&gt;for Clever Anjos, the database name, i was replace the origin database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once again thanks so much. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 12:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-Date-Range-Variable-to-QVD/m-p/475307#M177488</guid>
      <dc:creator />
      <dc:date>2013-11-04T12:53:53Z</dc:date>
    </item>
  </channel>
</rss>

