Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with synthetic keys

Can someone please explain to me why QV is doing this? I'm quite new...

I know how I would do this in SQL or something, I just want my Sales and Subscibers linked by State and Country. (INNER JOIN)

Why is QV Making these sync keys? How do I stop it?

LOAD SCRIPT;

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='£#,##0.00;-£#,##0.00';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

Sales:

LOAD JDEDrID,

     jdeaddressid,

     LastName,

     FirstName,

     Channel,

     AdvantageTier,

     Address1,

     Address2,

     Address3,

     Address4,

     City,

     State,

     PostalCode,

     Country,

     [Total Advantage Shipments 2012],

     [Advantage Shipments Per Location],

     TMName,

     RBMName,

     DirName

FROM

c

StateBoundaries:

LOAD StateName,

           State,

     StateBoundary

FROM

b

ZipQVD:

LOAD %Key_Polygon_453B20F2E4ED8F92,

     ZipBoundary,

     Zip AS PostalCode,

     Zip1,

     Zip2

FROM

a

Subscribers:

LOAD Network,

     [Account Name],

     [Ship City],

     [Ship State] AS State,

     [Ship Zip],

     County,

     Market,

     Country

FROM

x

zipLongLat:

LOAD zip AS [Ship Zip],

     city,

     state AS State,

     latitude,

     longitude,

     timezone,

     dst

FROM

y

and a picture of how it displays

http://imgur.com/ObA3KCT

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

Rename the filed, which are used in two table, In One table

if  two or more than two columns have same name in two table ,the its create a synthetic key.

in you case field causing synthetic key are

State

Ship zip

Country

in my view you should go for composite key

State& Country as Key in Both Table

and rename  State& Country in one of them

also ship zip should rename one place

hope this helps

Sunil Chauhan

View solution in original post

1 Reply
SunilChauhan
Champion II
Champion II

Rename the filed, which are used in two table, In One table

if  two or more than two columns have same name in two table ,the its create a synthetic key.

in you case field causing synthetic key are

State

Ship zip

Country

in my view you should go for composite key

State& Country as Key in Both Table

and rename  State& Country in one of them

also ship zip should rename one place

hope this helps

Sunil Chauhan