Originariamente inviato da optime
fantasia!

codice:
SELECT DISTINCT indirizzo FROM
(
SELECT Shipping_email AS indirizzo FROM ORDERS 
UNION
SELECT billing_email AS indirizzo FROM ORDERS 
UNION
SELECT shipping_notes AS indirizzo FROM ORDERS 
UNION
SELECT billing_notes AS indirizzo FROM ORDERS 
)
pane amore...

codice:
sql="SELECT DISTINCT indirizzo FROM (SELECT Shipping_email AS indirizzo FROM ORDERS WHERE shipping_notes LIKE '%-" & cs1 & "-%' OR shipping_notes LIKE '%-" & cs2 & "-%' UNION SELECT billing_email AS indirizzo FROM ORDERS WHERE billing_notes LIKE '%-" & cs1 & "-%' OR billing_notes LIKE '%-" & cs2 & "-%' ) "
così facessi... e così mi rispose:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Sintassi non corretta in prossimità di ')'.