I'm a newbie at this and I can figure most things out, but this one has me stumped. I don't know enough about it to even ask the question correctly.
I'm exporting an 'In-service Classes' database to excel.
This is my export coding:
----------------------------
<%@ Language=VBScript %>
<%
dim Cn,Rs
set Cn=server.createobject("ADODB.connection")
set Rs=server.createobject("ADODB.recordset")
Cn.open "provider=[private]; DRIVER={SQL Server}; SERVER=[private]; DATABASE=[private]; UID=[private]; PWD=[private];"
Rs.open "select * from [private] WHERE status is null or status <>'D' Order by Name",Cn,1,3
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=YearToDateExport.xls"
if Rs.eof <> true then
response.write "<table border=1>"
response.write("<tr><td>Name</td><td>Department</td><td>Extension</td><td>Class Taken</td><td>Class Desired</td></tr>")
while not Rs.eof
response.write "<tr><td>" & Rs.fields("Name") & "</td><td>" & Rs.fields("Division") & "</td><td>" & Rs.fields("Extension") & "</td><td>" & Rs.fields("ClassMonth") & "</td><td>" & Rs.fields("ClassDesired") & "</td></tr>"
Rs.movenext
wend
response.write "</table>"
end if
set rs=nothing
Cn.close
%>
----------------------------
This works fine. But my "ClassMonth" has many months in it and I would like the spreadsheet to not show 'Jan', 'Feb', etc. I want it to show 'First Aid', 'CPR for Beginners', etc.
Is there a way to do this? IF THEN statements don't work, and I'm not a VBScript person. If I knew where to look, or even how to phrase my query I could find it and figure it out, so any help would be great.
Thanks in advance
JackieW