Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 3 tables with the same field names. Is there anyway I can concatenate the tables into one table with the same field names?
VendorRAN:
load
(APHVCH) as LINK_KEYV1,
APHVCH,
Concat(if(APHNAM<>'SIOUX FALLS TAX',if(APHNAM<>'BALTIC TAX',if(APHNAM<>'EARTH CITY TAX',if(APHNAM<>'HURON TAX',if(APHNAM<>'TEXAS TAX - AUSTIN',APHNAM))))),'; ') as C
FROM
$(vQVDPath)AppVendorRAN.qvd (qvd);
VendorAER:
load
(APHVCH) as LINK_KEYV1,
APHVCH,
Concat(if(APHNAM<>'SIOUX FALLS TAX',if(APHNAM<>'BALTIC TAX',if(APHNAM<>'EARTH CITY TAX',if(APHNAM<>'HURON TAX',if(APHNAM<>'TEXAS TAX - AUSTIN',APHNAM))))),'; ') as C
FROM
$(vQVDPath)AppVendorAER.qvd (qvd);
VendorCAN:
load
(APHVCH) as LINK_KEYV1,
APHVCH,
Concat(if(APHNAM<>'SIOUX FALLS TAX',if(APHNAM<>'BALTIC TAX',if(APHNAM<>'EARTH CITY TAX',if(APHNAM<>'HURON TAX',if(APHNAM<>'TEXAS TAX - AUSTIN',APHNAM))))),'; ') as C
FROM
$(vQVDPath)AppVendorCAN.qvd (qvd);
Concatenation is the default when Field Names are the same. In your example, you will have all rows in ones table -- VendorRAN. You don't have to do anything different. Note that the VendorAER and VendorCAN tables will not be created.
-Rob
Concatenation is the default when Field Names are the same. In your example, you will have all rows in ones table -- VendorRAN. You don't have to do anything different. Note that the VendorAER and VendorCAN tables will not be created.
-Rob
Is there any way to concatenate differently named fields in different tables in my script?
You can force or suppress concatenation by using the CONCATENATE / NOCONCATENATE prefix on the Load statement.
-Rob