/ Published in: SQL
estrazione nominativi e indirizzi ultimi contatti per magazine
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT TOP 1100 [cognome_info]+" "+[nome_info] AS ragio, "" AS ragio2, REPLACE("via " & [via_info],"via via","via") AS indirizzo, info.cap_info, info.citta_info, info.provincia_info FROM info GROUP BY [cognome_info]+" "+[nome_info], "", REPLACE("via " & [via_info],"via via","via"), info.cap_info, info.citta_info, info.provincia_info HAVING (((REPLACE("via " & [via_info],"via via","via")) IS NOT NULL) AND ((info.cap_info) IS NOT NULL)) ORDER BY MAX(info.data_info) DESC;