<?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 Cannot add foreign key constraint with tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Cannot-add-foreign-key-constraint-with-tMap/m-p/2330996#M100023</link>
    <description>&lt;P&gt;Using the query below, I'm trying to add a foreign key constraint (alter table) to the table.&lt;/P&gt; 
  &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
  &lt;P&gt;&lt;STRONG&gt;Query Used&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;DIV&gt; 
   &lt;A&gt;Spoiler&lt;/A&gt; (Highlight to read) 
   &lt;DIV&gt; 
    &lt;DIV&gt;
      select table_view, 
     &lt;BR /&gt;object_type, 
     &lt;BR /&gt;constraint_type, 
     &lt;BR /&gt;constraint_name, 
     &lt;BR /&gt;details 
     &lt;BR /&gt;from ( 
     &lt;BR /&gt;select schema_name(t.schema_id) + '.' + t.[name] as table_view, 
     &lt;BR /&gt;case when t.[type] = 'U' then 'Table' 
     &lt;BR /&gt;when t.[type] = 'V' then 'View' 
     &lt;BR /&gt;end as [object_type], 
     &lt;BR /&gt;case when c.[type] = 'PK' then 'Primary key' 
     &lt;BR /&gt;when c.[type] = 'UQ' then 'Unique constraint' 
     &lt;BR /&gt;when i.[type] = 1 then 'Unique clustered index' 
     &lt;BR /&gt;when i.type = 2 then 'Unique index' end as constraint_type, isnull(c.[name], i.[name]) as constraint_name, substring(column_names, 1, len(column_names)-1) as [details] from sys.objects t left outer join sys.indexes i 
    &lt;/DIV&gt; 
   &lt;/DIV&gt; 
  &lt;/DIV&gt; 
 &lt;BR /&gt;&lt;BR /&gt;To see the whole post, download it &lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mcwf" target="_blank"&gt;here&lt;/A&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:51:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T02:51:47Z</dc:date>
    <item>
      <title>Cannot add foreign key constraint with tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Cannot-add-foreign-key-constraint-with-tMap/m-p/2330996#M100023</link>
      <description>&lt;P&gt;Using the query below, I'm trying to add a foreign key constraint (alter table) to the table.&lt;/P&gt; 
  &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
  &lt;P&gt;&lt;STRONG&gt;Query Used&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;DIV&gt; 
   &lt;A&gt;Spoiler&lt;/A&gt; (Highlight to read) 
   &lt;DIV&gt; 
    &lt;DIV&gt;
      select table_view, 
     &lt;BR /&gt;object_type, 
     &lt;BR /&gt;constraint_type, 
     &lt;BR /&gt;constraint_name, 
     &lt;BR /&gt;details 
     &lt;BR /&gt;from ( 
     &lt;BR /&gt;select schema_name(t.schema_id) + '.' + t.[name] as table_view, 
     &lt;BR /&gt;case when t.[type] = 'U' then 'Table' 
     &lt;BR /&gt;when t.[type] = 'V' then 'View' 
     &lt;BR /&gt;end as [object_type], 
     &lt;BR /&gt;case when c.[type] = 'PK' then 'Primary key' 
     &lt;BR /&gt;when c.[type] = 'UQ' then 'Unique constraint' 
     &lt;BR /&gt;when i.[type] = 1 then 'Unique clustered index' 
     &lt;BR /&gt;when i.type = 2 then 'Unique index' end as constraint_type, isnull(c.[name], i.[name]) as constraint_name, substring(column_names, 1, len(column_names)-1) as [details] from sys.objects t left outer join sys.indexes i 
    &lt;/DIV&gt; 
   &lt;/DIV&gt; 
  &lt;/DIV&gt; 
 &lt;BR /&gt;&lt;BR /&gt;To see the whole post, download it &lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Mcwf" target="_blank"&gt;here&lt;/A&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:51:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Cannot-add-foreign-key-constraint-with-tMap/m-p/2330996#M100023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T02:51:47Z</dc:date>
    </item>
  </channel>
</rss>

