Evitar ambiguidade em um Update
Pessoal...estou com uma dúvida em relação a um update. Estou fazendo assim:
String sql="UPDATE investigambulat SET codLocPreNat='"+Integer.parseInt(dadosInvestigAmbulat[1])+"',preNatAltoRisco='"+dadosInvestigAmbulat[2]+
"',localPreNatRisco='"+dadosInvestigAmbulat[3]+"' WHERE codInvestig=(SELECT codInvestig FROM "+
"investigacao A,investigambulat B WHERE A.numDO='"+dadosInvestigAmbulat[0]+"')";
Minhas tabelas estão assim:
INVESTIGAMBULAT INVESTIGACAO
codInvestigAmbul codInvestig
codInvestig dtInvestig
codLocalInvestig nomeInvestig
codLocPreNat funcaoInvestig
preNatAltoRisco numDO
localPreNatRisco statusInvest
natRetornAmbulat codDS
Estou obtendo o erro: "Column 'codInvestig' in field list is ambiguous". Como resolver isto ?
Discussão (3)
Carregando comentários...