Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
polisetti
Creator II

Link Table Script

Hi,

I had 4 different tables in which 4 fields are common in all the tables .So now i joined all the 4 tables and a synthetic table is formed due to that common fields.So How to create a link table for that 4 fields. Can any one please suggest me by using steps to create link table.

1 Solution

Accepted Solutions
its_anandrjs

See the small example for the Link table creation by below script here are two tables one is Sales, Budget by the use of this tables create the link table

Sales:

LOAD Year&'_'&Month&'_'&[Customer Number] as Key,[Sale Amt],Year,Month;

LOAD * INLINE [

    Year, Month, Customer Number,Sale Amt

    2013, 4,A,15874

    2014, 5,B,12569];

Budget:

LOAD Year&'_'&Month&'_'&[Customer Number] as Key,[Budget Amt],Year,Month;

LOAD * INLINE [

    Year, Month, Customer Number,Budget Amt

    2013, 4,A,45000

    2014, 5,B,46000];

LinkTable:

LOAD Key,Year as YEAR,Month as MONTH Resident Sales;

Concatenate

LOAD Key,Year AS YEAR,Month AS MONTH Resident Budget;

DROP Fields Year,Month;

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III

See this discussion: Re: How do I get rid of $Syn table..how to create a link table..Please help


talk is cheap, supply exceeds demand
its_anandrjs

See the small example for the Link table creation by below script here are two tables one is Sales, Budget by the use of this tables create the link table

Sales:

LOAD Year&'_'&Month&'_'&[Customer Number] as Key,[Sale Amt],Year,Month;

LOAD * INLINE [

    Year, Month, Customer Number,Sale Amt

    2013, 4,A,15874

    2014, 5,B,12569];

Budget:

LOAD Year&'_'&Month&'_'&[Customer Number] as Key,[Budget Amt],Year,Month;

LOAD * INLINE [

    Year, Month, Customer Number,Budget Amt

    2013, 4,A,45000

    2014, 5,B,46000];

LinkTable:

LOAD Key,Year as YEAR,Month as MONTH Resident Sales;

Concatenate

LOAD Key,Year AS YEAR,Month AS MONTH Resident Budget;

DROP Fields Year,Month;