Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Preciso criar este LOAD no script abaixo:
Já está funcionando como set analysis, conforme exemplo anexo:
Qual seria a maneira certa para fazer.
Preciso CONCATENAR as Tabelas abaixo: TABELAPRAZO e PRAZO.
Mas não estou conseguindo...
VND_Tmp: LOAD Num(Replace(PEDIDO, '.', ',')) AS PEDIDO, Num(Replace(COD_REP, '.', ',')) AS COD_REP, Date(Floor(DATA_PEDIDOX),'DD/MM/YYYY') AS CalendarDate, Num(Replace(VLR_ITEM, '.', ',')) AS VLR_ITEM_FATURAR_TOTAL, Num(Replace(TABELA_VENDA, '.', ',')) AS TABELA_PRAZO, ID_CATEG_REP, PRAZO_MEDIO_CR FROM (qvd); Join(VND_Tmp) REP: LOAD NOME_REPRESENTANTE as REPRESENTANTE, COD_TP_REP, COD_REPRESENTANTE as COD_REP FROM (qvd); NoConcatenate VND: Load * , COD_TP_REP & '-' & PRAZO_MEDIO_CR As Cod_TP_PRAZOMEDIO Resident VND_Tmp; Drop table VND_Tmp; //Aqui que preciso Concatenate TABELAPRAZO: LOAD TABELA AS TABELA_PRAZO, DESCONTO AS DESCONTO_PRAZO, Num(Replace([VALOR MINIMO], '.', ',')) AS DESCONTO_MINIMO FROM (ooxml, embedded labels, table is [DESCONTO MAXIMO]); //Aqui que preciso Concatenate PRAZO: LOAD [REG-PRAZO] AS Cod_TP_PRAZOMEDIO, [DESC MAXIMO] AS DESCONTO_MAXIMO FROM (ooxml, embedded labels, table is REGISTRO_PRAZO);
VND_Tmp:
LOAD
Num(Replace(PEDIDO, '.', ',')) AS PEDIDO,
Num(Replace(COD_REP, '.', ',')) AS COD_REP,
Date(Floor(DATA_PEDIDOX),'DD/MM/YYYY') AS CalendarDate,
Num(Replace(VLR_ITEM, '.', ',')) AS VLR_ITEM_FATURAR_TOTAL,
Num(Replace(TABELA_VENDA, '.', ',')) AS TABELA_PRAZO,
ID_CATEG_REP,
PRAZO_MEDIO_CR
FROM (qvd);
Join(VND_Tmp)
REP:
NOME_REPRESENTANTE as REPRESENTANTE,
COD_TP_REP,
COD_REPRESENTANTE as COD_REP
NoConcatenate
VND:
Load * ,
COD_TP_REP & '-' & PRAZO_MEDIO_CR As Cod_TP_PRAZOMEDIO
Resident VND_Tmp;
Drop table VND_Tmp;
//Aqui que preciso Concatenate
TABELAPRAZO:
LOAD TABELA AS TABELA_PRAZO,
DESCONTO AS DESCONTO_PRAZO,
Num(Replace([VALOR MINIMO], '.', ',')) AS DESCONTO_MINIMO
FROM
(ooxml, embedded labels, table is [DESCONTO MAXIMO]);
PRAZO:
LOAD [REG-PRAZO] AS Cod_TP_PRAZOMEDIO,
[DESC MAXIMO] AS DESCONTO_MAXIMO
(ooxml, embedded labels, table is
REGISTRO_PRAZO);