Galera, tenho uma consulta em Access, no qual ela funciona perfeitamente no Access, mas em Java dá erro…
o erro que dá é “Parâmetros insuficientes. Eram esperados 4.”
sql = "SELECT DISTINCTROW [02 - Plataforma].Plataforma, [05 - Logística].Situação, [05 - Logística].Chapa, [04 - Pessoal].Nome, [04 - Pessoal].Função, [05 - Logística].Inicio, [05 - Logística].Termino, [05 - Logística].Ativo, [04 - Pessoal].Demitido FROM [04 - Pessoal] INNER JOIN (([02 - Plataforma] INNER JOIN [03 - Contrato x Plataforma] ON [02 - Plataforma].Plataforma = [03 - Contrato x Plataforma].Plataforma) INNER JOIN [05 - Logística] ON [03 - Contrato x Plataforma].Código = [05 - Logística].Locação) ON [04 - Pessoal].Chapa = [05 - Logística].Chapa GROUP BY [02 - Plataforma].Plataforma, [05 - Logística].Situação, [05 - Logística].Chapa, [04 - Pessoal].Nome, [04 - Pessoal].Função, [05 - Logística].Inicio, [05 - Logística].Termino, [05 - Logística].Ativo, [04 - Pessoal].Demitido, [03 - Contrato x Plataforma].[Off-Shore] HAVING ((([05 - Logística].Ativo)=True) AND (([04 - Pessoal].Demitido)=No) AND (([03 - Contrato x Plataforma].[Off-Shore])=False))";