I retrieved all the records from database, and there are lots of duplicates due to pushing all the records into drop down list.
Code:
Reason for not using distinct is due to other fields are required from this query.
Before:
>2013,2013,2013 ,2013,..... 2014,2014... 2015,2015,2015. ..
I want to filter up the record in drop down list to become:
>2013,2014,20 15
I know it need a condition in between the loop but I can't figure it out.
Please Help. thanks
Below is my code :
Code:
Code:
SQL = "SELECT * FROM insite.holiday where calendar_Type= '" &sCalendarType& "' order by date_holiday"
Before:
>2013,2013,2013 ,2013,..... 2014,2014... 2015,2015,2015. ..
I want to filter up the record in drop down list to become:
>2013,2014,20 15
I know it need a condition in between the loop but I can't figure it out.
Please Help. thanks
Below is my code :
Code:
response.write(" <select name=""year1"">")
Do While not rs.eof
nDateHoliday = rs("date_holiday")
Ndate= year(nDateHoliday)
response.write("<option value=" & Ndate & ">" & Ndate & "</option>" & vbCrLf)
rs.MoveNext()
Loop
response.write("</select>")
Comment