Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
pandreozzi
Contributor

Create a dulipcate table from an existing table

I have an issue with a relationship that creates a loop based on my table structure. I do not have access nor control on how the tables get created or modified. I only have an ODBC connection to the DB and this is why when I add a table that needs a relationship with other tables that currently have existing relationships I get loops. I am thinking if I can duplicate the date in my table that I need to form the relationship with thereby creating two identical tables I can form two separate relationships to get the information I need. There are only three fields in this table and below is my qlikview code to access the table. I also attached an image of the loop.

The SWCUSTOMERID is used to form the relationship with the other tables that need the Vendor information from the SW_CUSTOMER table.

Vendor_Provider:

LOAD

SWCUSTOMERID AS C_PROVIDER_ID,

SWNAME AS C_PROVIDER_NAME,

SWNOTE AS C_NOTES

;

SQL

SELECT

SWCUSTOMERID,

SWNAME,

SWNOTE

FROM GPS.SW_CUSTOMER

;

25 Replies
Highlighted
vishsaggi
Esteemed Contributor III

Re: Create a dulipcate table from an existing table

I am not sure but try this and let us know?

Concatenate Access_Circuit and Base_Circuit tables.

Rename the field [Access_ID] AS Channel_Access_ID in Challen_Port table. Do these two and run and let us know.

So something like this.

Base_Circuit:

LOAD ....,

          ....

FROM yourBaseCircuitSource;

Concatenate

Access_Circuit:

LOAD *,.....

FROM YourAcessCircuitSource;

Highlighted
pandreozzi
Contributor

Re: Create a dulipcate table from an existing table

I am not sure what your trying to accomplish. Both my Base Circuit and my Access Circuit tables need to form relationships with the sw site table. I think your trying to bring those together and make a new table out of the base and access circuits. correct. If that is the case this will not work as there are other fields in those tables that are named the same and cannot overlap.

Highlighted
vishsaggi
Esteemed Contributor III

Re: Create a dulipcate table from an existing table

Yes, that is what i am trying to do and once they are concatenated that one single table holds the data of Base and Access table columns with their data. And where is your SW Site table I cant see in your data model?

Else just rename your Channel_Port Access_ID field to Channel_Access_ID and run it.

Highlighted
pandreozzi
Contributor

Re: Create a dulipcate table from an existing table

Ok. the sw site table is loaded as Vendor Provider: and needs a relationship to both the channel and access tables.

Highlighted
pandreozzi
Contributor

Re: Create a dulipcate table from an existing table

sorry a relationship with the base and access tables

Highlighted
vishsaggi
Esteemed Contributor III

Re: Create a dulipcate table from an existing table

Can you send me your new data model snapshot after doing these changes?

Highlighted
pandreozzi
Contributor

Re: Create a dulipcate table from an existing table

I will but it won't be until Monday is that is ok.

Highlighted
vishsaggi
Esteemed Contributor III

Re: Create a dulipcate table from an existing table

No problem. Once you have it just send me here.

Highlighted
pandreozzi
Contributor

Re: Create a dulipcate table from an existing table

GM Vishwarath. I looked at your suggestion and cannot see how this will work. I am uploading additional information that may help in the solution. Let me know.