In an MS SQL table, I have a number of fields with the value of 0 or 1 (or sometimes Null). I want to present these on screen as "No" and "Yes" and have used some simple conditionals to do it. But it occured to me that maybe it could be more easily done with a simple function. Where ever there is call to write one of those fields, for example (if the function were called "rewrite"
:
<%=rs("Elevator"
%>
which would give the value of 0 or 1, it could call the function something like:
<%=rewrite(rs("Elevator"
)%>
which would replace the 0 or 1 with No or Yes.
Problem is, I don't know where to begin since I've never written a function before. Can someone help? Thanks! Don
don@pc-homepage.com
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT/2000 (only when I have to!)
<%=rs("Elevator"
which would give the value of 0 or 1, it could call the function something like:
<%=rewrite(rs("Elevator"
which would replace the 0 or 1 with No or Yes.
Problem is, I don't know where to begin since I've never written a function before. Can someone help? Thanks! Don
don@pc-homepage.com
Experienced in HTML, Perl, VBScript, PWS, IIS and Apache. Run OS/2 Warp 4, BeOS v5 and Windows NT/2000 (only when I have to!)