Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Boa tarde!
Possuo o seguinte comando
select data, codigo, guia from tabela1 where data = 'YYYY/MM'
MINUS
select data, codigo, guia from tabela2 where data = 'YYYY/MM'
Gostaria de saber como realizar este comando fazendo a busca por qvd.. ou seja...
load data, codigo, guia from tab1.qvd where data = 'YYYY/MM'
load data, codigo, guia from tab2.qvd where data = 'YYYY/MM'
Existe esta possibilidade?
Boa noite,
MINUS não é possível. Tente usar "not existe":
Primeiro:
Tmp:LOAD DISTINCT data & codigo & guia AS LOOKUPFROM tab2.qvdWHERE data = 'YYYY/MM';
Então:
Result:LOAD data, codigo, guiaFROM tab1.qvdWHERE not exists(LOOKUP, data & codigo & guia)and data = 'YYYY/MM';DROP TABLE Tmp;
Espero que isso ajude.
- Ralf