update email_a
set uguale=1
from email_a a join email_b b
on a.email=b.email
update email_a
set uguale=1
from email_a a join email_b b
on a.email=b.email
dove _a e _b sono _tabellaA e _tabellaB?
Corretto?
update tabella_a
set uguale=1
from tabella_a a join tabella_b b
on a.email=b.email
ok, ultima domanda:
se in corrispondenza dell'email uguale trovata deve verificare anche che, sempre in tabellaA, il campo attivo sia 'NO', come devo modificare?
aggiungilo alla ON
Così va in errore...
[coce]
strq = "UPDATE tabellaA SET attiva='NO' from tabellaA a JOIN tabellaB b on ((a.email = b.email) and (b.attiva='NO'))"
[/code]
peggy, lo sai che se dici solo "va in errore" non significa niente
scusa, hai ragione.. ecco l'errore:
codice:Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [MySQL][ODBC 3.51 Driver][mysqld-5.0.92-enterprise-gpl-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from tabellaA a JOIN tabellaB b on ((a.email = b.email) and (b.a' at line 1
![]()
mi pare tutto corretto...
e senza la b.attiva='no' funziona?