<?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 What is the Qlikview syntax for SQL Server's DB_NAME() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-is-the-Qlikview-syntax-for-SQL-Server-s-DB-NAME/m-p/496074#M479860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to pull data from different databases.&amp;nbsp; There are no unique keys across the different databases.&amp;nbsp; I would like to create a unique key by concatenating the database name, which can be found using DB_NAME() in SQL Server, with the unique key found within the database.&amp;nbsp; Is there a way to pull data into Qlikview, directly from SQL Server and accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jan 2014 19:26:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-10T19:26:11Z</dc:date>
    <item>
      <title>What is the Qlikview syntax for SQL Server's DB_NAME()</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-Qlikview-syntax-for-SQL-Server-s-DB-NAME/m-p/496074#M479860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to pull data from different databases.&amp;nbsp; There are no unique keys across the different databases.&amp;nbsp; I would like to create a unique key by concatenating the database name, which can be found using DB_NAME() in SQL Server, with the unique key found within the database.&amp;nbsp; Is there a way to pull data into Qlikview, directly from SQL Server and accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 19:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-Qlikview-syntax-for-SQL-Server-s-DB-NAME/m-p/496074#M479860</guid>
      <dc:creator />
      <dc:date>2014-01-10T19:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the Qlikview syntax for SQL Server's DB_NAME()</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-Qlikview-syntax-for-SQL-Server-s-DB-NAME/m-p/496075#M479861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can simply use the sql select statement you would use when working with SQL Server directly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableInQlikview:&lt;/P&gt;&lt;P&gt;select *, UniqueKey + DB_NAME() as Key&lt;/P&gt;&lt;P&gt;from dbo.TableInSQLServer;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 19:38:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-Qlikview-syntax-for-SQL-Server-s-DB-NAME/m-p/496075#M479861</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-01-10T19:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: What is the Qlikview syntax for SQL Server's DB_NAME()</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-Qlikview-syntax-for-SQL-Server-s-DB-NAME/m-p/496076#M479862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Anthony,&lt;/P&gt;&lt;P&gt;If you want to create a unique key for a table, why don't you try using RowNo(). This will give a unique number for each row(it will also be sequential based on load order). Also when you pull the table you will be knowing which database you are pulling from. Just Create a field like 'Microsoft DB' as [DB Name] for each of the tables with their respective DB names. Store those tables in qvds and later use those qvds to perform your modelling&lt;/P&gt;&lt;P&gt;Hope this was of some help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 19:41:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-Qlikview-syntax-for-SQL-Server-s-DB-NAME/m-p/496076#M479862</guid>
      <dc:creator />
      <dc:date>2014-01-10T19:41:48Z</dc:date>
    </item>
  </channel>
</rss>

