<?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 Convert GUID to correct format in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461656#M610751</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 am very new to QlikView and have been searching for a way to convert a GUID. In sql I have to convert it to a uniqueidentifier to get the correct value but QlikView will not allow me to add that to the LOAD sql statement.&amp;nbsp; The below is a portion of my code. I have also tried CAST and that also throws and error.&lt;/P&gt;&lt;P&gt;What I get: CB1BFE06ADC74444B9729AA5FCF35096&lt;/P&gt;&lt;P&gt;What I need to get (and works in SQL): 06FE1BCB-C7AD-4444-B972-9AA5FCF35096&lt;/P&gt;&lt;P&gt;Please let me know of any suggestions! Thanks!&lt;/P&gt;&lt;P&gt;Amy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UserName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;displayName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;distinguishedName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UserDN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;objectcategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;objectGUID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;userAccountControl&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;extensionattribute15&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;title&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;lastLogon&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; select &lt;BR /&gt; name&lt;BR /&gt; , displayName, distinguishedName, objectcategory, objectGUID, userAccountControl,extensionattribute15, title&lt;BR /&gt; , lastLogon &lt;BR /&gt; , CONVERT(UNIQUEIDENTIFIER, ObjectGUId) as AD_GUID&lt;BR /&gt; FROM 'LDAP://$(RootDse)' &lt;BR /&gt; where name&amp;gt;'$(arg)' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and objectCategory = 'Person'&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jan 2018 17:02:54 GMT</pubDate>
    <dc:creator>asharppresidio</dc:creator>
    <dc:date>2018-01-09T17:02:54Z</dc:date>
    <item>
      <title>Convert GUID to correct format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461656#M610751</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 am very new to QlikView and have been searching for a way to convert a GUID. In sql I have to convert it to a uniqueidentifier to get the correct value but QlikView will not allow me to add that to the LOAD sql statement.&amp;nbsp; The below is a portion of my code. I have also tried CAST and that also throws and error.&lt;/P&gt;&lt;P&gt;What I get: CB1BFE06ADC74444B9729AA5FCF35096&lt;/P&gt;&lt;P&gt;What I need to get (and works in SQL): 06FE1BCB-C7AD-4444-B972-9AA5FCF35096&lt;/P&gt;&lt;P&gt;Please let me know of any suggestions! Thanks!&lt;/P&gt;&lt;P&gt;Amy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UserName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;displayName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;distinguishedName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;UserDN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;objectcategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;objectGUID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;userAccountControl&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;extensionattribute15&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;title&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;lastLogon&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; select &lt;BR /&gt; name&lt;BR /&gt; , displayName, distinguishedName, objectcategory, objectGUID, userAccountControl,extensionattribute15, title&lt;BR /&gt; , lastLogon &lt;BR /&gt; , CONVERT(UNIQUEIDENTIFIER, ObjectGUId) as AD_GUID&lt;BR /&gt; FROM 'LDAP://$(RootDse)' &lt;BR /&gt; where name&amp;gt;'$(arg)' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and objectCategory = 'Person'&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 17:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461656#M610751</guid>
      <dc:creator>asharppresidio</dc:creator>
      <dc:date>2018-01-09T17:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert GUID to correct format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461657#M610752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your load bit after the line&lt;/P&gt;&lt;P&gt;,lastLogon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,AD_GUID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 17:14:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461657#M610752</guid>
      <dc:creator>atoz1158</dc:creator>
      <dc:date>2018-01-09T17:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Convert GUID to correct format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461658#M610754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: arial,helvetica,sans-serif; font-size: 13.33px; font-style: normal; font-weight: 400; text-align: left; text-indent: 0px;"&gt;Thanks! But I have tried that and it throws an error. I left that line it to show what I was trying to pull in. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 17:28:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461658#M610754</guid>
      <dc:creator>asharppresidio</dc:creator>
      <dc:date>2018-01-09T17:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Convert GUID to correct format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461659#M610756</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;maybe you could use a preceding load and convert the &lt;SPAN style="font-size: 13.3333px;"&gt;ObjectGUId like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15155337030889307" jivemacro_uid="_15155337030889307" modifiedtitle="true"&gt;
&lt;P&gt;Left(ObjectGUId,8)&amp;amp;'-'&amp;amp;Mid(ObjectGUId,9,4)&amp;amp;'-'&amp;amp;Mid(ObjectGUId,13,4)&amp;amp;'-'&amp;amp;Mid(ObjectGUId,17,4)&amp;amp;'-'&amp;amp;Mid(ObjectGUId,21) as ObjectGUId&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2018 21:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1461659#M610756</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-01-09T21:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert GUID to correct format</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1928450#M1218882</link>
      <description>&lt;P&gt;It's seems to work with that code.&lt;/P&gt;
&lt;P&gt;Mid(objectGUID,7,2) &amp;amp; Left(objectGUID,1) &amp;amp; Mid(objectGUID,6,1) &amp;amp; Mid(objectGUID,3,3) &amp;amp; Mid(objectGUID,2,1) &amp;amp;'-'&amp;amp; Mid(objectGUID,11,2)&amp;amp;&lt;BR /&gt;Mid(objectGUID,9,2)&amp;amp;'-'&amp;amp;Mid(objectGUID,15,2) &amp;amp; Mid(objectGUID,13,2) &amp;amp;'-'&amp;amp;Mid(objectGUID,17,4)&amp;amp;'-'&amp;amp;Mid(objectGUID,21)&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 09:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-GUID-to-correct-format/m-p/1928450#M1218882</guid>
      <dc:creator>LaetDcq</dc:creator>
      <dc:date>2022-05-10T09:30:02Z</dc:date>
    </item>
  </channel>
</rss>

