io ho fatto così:


sSql = "SELECT *, convert(varchar(2),Giorno) + '/' + convert(varchar(2),Mese) + '/' + convert(varchar(4),Anno) AS DataMatta FROM master WHERE (1=1 "
if livello<>"" or livello<>NULL then
sSql = sSql + " AND livello="&livello
end if
if regione<>"" or regione<>NULL then
sSql = sSql + " AND regione="&regione
end if
if universita<>"" or universita<>NULL then
sSql = sSql + " AND universita="&universita
end if
if facolta<>"" or facolta<>NULL then
sSql = sSql + " AND facolta="&facolta
end if

sSql = sSql + ") ORDER BY id DESC"



ma mi da questo errore dove c'è livello:

Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'secondo'.