Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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

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
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