<?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: Replacement of CAST function in QlikView! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276779#M1197491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thee is no CAST equivalent in QlikVIew because QlikVIew does not have data types per se. So there should be no need to CAST anything. Just read it the way the database gives it to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2015 20:15:57 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2015-05-29T20:15:57Z</dc:date>
    <item>
      <title>Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276772#M1197484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the replacement of CAST in QlikView. The situation is prior to the QVD file we were using OLEDB/ODBC connection and now we are trying to retrieve data from QVD. but the previous version has cast function in that. this is giving error while reloading. Please let me know about the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Shubham Kumar &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 09:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276772#M1197484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-09T09:36:06Z</dc:date>
    </item>
    <item>
      <title>Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276773#M1197485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Shubham,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If got the answer for this.Share the solution to me aslo. Thanks advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 09:39:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276773#M1197485</guid>
      <dc:creator>siva_boggarapu</dc:creator>
      <dc:date>2011-06-09T09:39:43Z</dc:date>
    </item>
    <item>
      <title>Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276774#M1197486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Dear Mr. Siva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sure..however you can have look on this while keep watching the answer for the other qlikview members.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 09:41:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276774#M1197486</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-09T09:41:08Z</dc:date>
    </item>
    <item>
      <title>Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276775#M1197487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I assume your old ODBC script has something like cast(sales, numeric(8))? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your qvd you can do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load num(sales, '#,##0.##') as sales from sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to force the number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;other similar functions to consider, month(), year(), money(), date(), time() &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;post a sample of your script if this doesnt help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 22:02:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276775#M1197487</guid>
      <dc:creator />
      <dc:date>2011-06-09T22:02:25Z</dc:date>
    </item>
    <item>
      <title>Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276776#M1197488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Leonard for you answer. here I am posting a sample to make you clear about my situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM dbo.OverUnder_history with (nolock) &lt;BR /&gt;where 1=1&lt;BR /&gt;and OU_OutBoundDate &amp;gt;= CAST('$(_FYFromDate_)' AS datetime) and OU_OutBoundDate&amp;lt; CAST('$(_FYToDate_)' AS datetime) &lt;BR /&gt;and ((datediff(dd,pull_date, getdate()) between 0 and &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; or datepart(dw,Pull_date)= 2) &lt;BR /&gt;AND (OU_ProductMarketCode IN ('GAUS', 'GACA')) &lt;BR /&gt;AND OU_GLName NOT LIKE '%convent%' ; &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;/P&gt;&lt;P&gt;This was the statement when loading from SQL and now we are loading from QVD so while reloading its gives error. CAST is not recognised function. Even for NOT LIKE Please help.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Shubham&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2011 05:24:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276776#M1197488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-10T05:24:11Z</dc:date>
    </item>
    <item>
      <title>Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276777#M1197489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this, I am assuming that _FYFromDate_ is a variable within Qlikview correct?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM dbo.OverUnder_history with (nolock) &lt;BR /&gt;where 1=1&lt;BR /&gt;and OU_OutBoundDate &amp;gt;= timestamp($(_FYFromDate_)&lt;SPAN style="font-style: normal;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-style: normal;"&gt;'YYYY-MM-DD hh.mm'&lt;/SPAN&gt;) and OU_OutBoundDate&amp;lt; timestamp($(_FYToDate_)&lt;SPAN style="font-style: normal;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-style: normal;"&gt;'YYYY-MM-DD hh.mm'&lt;/SPAN&gt;) &lt;BR /&gt;and ((datediff(dd,pull_date, getdate()) between 0 and &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; or datepart(dw,Pull_date)= 2) &lt;BR /&gt;AND (OU_ProductMarketCode IN ('GAUS', 'GACA')) &lt;BR /&gt;AND OU_GLName NOT LIKE '%convent%' ; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2011 05:59:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276777#M1197489</guid>
      <dc:creator />
      <dc:date>2011-06-10T05:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276778#M1197490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am having the same issue too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My sample script is&lt;/P&gt;&lt;P&gt; 'AL' + '-' + RTRIM(CAST(ACCOUNT_NUMBER1 AS VARCHAR)) + '-' + RTRIM(CAST(ACCOUNT_NUMBER2 AS VARCHAR)) AS 'Acct Num'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is when we used to use SQL but now changed to oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i think if we are using oracle as a database we cannot make any changes to the SQL Select statement, We can only make changes to the preceding load statement. But in the preceding load it is not letting me use the cast function since it is not a designated qlikview function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me replicate this statement. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 19:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276778#M1197490</guid>
      <dc:creator>maahivee</dc:creator>
      <dc:date>2015-05-29T19:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276779#M1197491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thee is no CAST equivalent in QlikVIew because QlikVIew does not have data types per se. So there should be no need to CAST anything. Just read it the way the database gives it to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 20:15:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276779#M1197491</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-05-29T20:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276780#M1197492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I think you must change the SQL (SQL Server?). Some functions are different from Sql Server to Oracle.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So if you change from Sql Server to Oracle, maybe you get some syntax error (unless your sql is always select * from table). If I'm not wrong, for concat string&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL Server&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;||&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Oracle&lt;/P&gt;&lt;P&gt;RTRIM and CAST should also work in Oracle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) you can use a simple sql like &lt;/P&gt;&lt;P&gt;sql select ACCOUNT_NUMBER_1, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ACCOUNT_NUMBER2 from .....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;and change the preceding load using QlikView functions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 22:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276780#M1197492</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-05-29T22:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276781#M1197493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;This is obviously Microsoft SQL Sever - which I deduce from the dbo.xxxx and WITH (NOLOCK) and also DATADIFF&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL Server syntax:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM dbo.OverUnder_history with (nolock) &lt;BR /&gt;where 1=1&lt;BR /&gt;and OU_OutBoundDate &amp;gt;= CAST('$(_FYFromDate_)' AS datetime) and OU_OutBoundDate&amp;lt; CAST('$(_FYToDate_)' AS datetime) &lt;BR /&gt;and ((datediff(dd,pull_date, getdate()) between 0 and &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; or datepart(dw,Pull_date)= 2) &lt;BR /&gt;AND (OU_ProductMarketCode IN ('GAUS', 'GACA')) &lt;BR /&gt;AND OU_GLName NOT LIKE '%convent%' ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Should be translated to something like this (not tested):&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM OverUnder_history.QVD (QVD)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE&amp;nbsp; 1=1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND OU_OutBoundDate &amp;gt;= Num($(_FYFromDate_))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND OU_OutBoundDate &amp;lt; Num($(_FYToDate_))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND (&amp;nbsp; ( Today() - pull_date &amp;gt;= 0 AND Today() - pull_date &amp;lt;= 8 ) OR ( WeekDay( pull_date ) = 2 ) )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND ( Match( OU_ProductMarketCode , 'GAUS' , 'GACA') &amp;gt; 0 )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AND Not( OU_GLName Like '*convent*'); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't copy what you had in your original SQL statement and put it at the end of a LOAD statement after FROM ... WHERE. The SQL statement is entirely interpreted by the SQL Database and governed by it's specific SQL-syntax. The LOAD statement is entirely interpreted by QlikView and has some similarities but has it's own syntax and keywords.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically there is no:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;dbo.&lt;/LI&gt;&lt;LI&gt;with (nolock)&lt;/LI&gt;&lt;LI&gt;CAST( ... AS ... )&lt;/LI&gt;&lt;LI&gt;DATEDIFF()&lt;/LI&gt;&lt;LI&gt;DATEPART()&lt;/LI&gt;&lt;LI&gt;BETWEEN&lt;/LI&gt;&lt;LI&gt;IN&lt;/LI&gt;&lt;LI&gt;NOT LIKE&lt;/LI&gt;&lt;LI&gt;and finally % wildcard&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All this has to be translated into something equivalent in QlikView Load Script ... which I did attempt to do above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally if the QVD-file was populated with the SQL-statement you indicated you might not need to do all this logic in the WHERE clause at all... Maybe everything has been filtered correctly so this is superfluous. &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;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2015 02:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276781#M1197493</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-05-30T02:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Replacement of CAST function in QlikView!</title>
      <link>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276782#M1197494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Didn't even noticed that this was a very old thread ... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2015 02:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replacement-of-CAST-function-in-QlikView/m-p/276782#M1197494</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-05-30T02:09:23Z</dc:date>
    </item>
  </channel>
</rss>

