sql=select * from ggevent where groupid='jsmith' and datemmm > ' ' and dateyyyy > ' ' and datedd > ' ' and timehh > ' ' and venue > ' ' and city > ' ' and state > ' ' and zip > ' 'and title > ' ' order by cast(datemmm+' '+datedd+' '+dateyyyy+' '+timehh+':'+case when timemm <= ' ' then '00' else timemm end+case when len(timeampm) > 0 then left(timeampm,1) else 'A' end +'M' as datetime)