shutterace
MIS
I want to give the user a drop down that includes only the first 3 characters of a string. The string is format is ###-##-### and the field type is char. I have it working but I can't figure out how to only show distinct values in the drop down. Everthing I try gives an error. There are @ 30,000 records with 20 or so prefixes. I hope I explained myself well. Here is the code:
<td>
<%
Set rsPCL = Server.CreateObject("ADODB.RecordSet"
qPCL = "SELECT SUBSTRING([Parcel_Number], 1, 3) AS parcel FROM AZLiens GROUP BY [Parcel_Number] ORDER BY [Parcel_Number]"
rsPCL.Open qPCL, "DSN=;UID=;PWD="
%>
<form method="POST" name="azlienmain2" action="azlienmain2.asp">
Parcel Prefix:
<font face="Arial" size="2">
<select name="parcel">
<%while NOT rsPCL.EOF%>
<option value="<%=rsPCL("parcel"
%>">
<%=rsPCL("parcel"
%>
</option>
<%
rsPCL.MoveNext
wend
%>
</select>
</font>
</td>
Thanks in advance!
-Jim
<td>
<%
Set rsPCL = Server.CreateObject("ADODB.RecordSet"
qPCL = "SELECT SUBSTRING([Parcel_Number], 1, 3) AS parcel FROM AZLiens GROUP BY [Parcel_Number] ORDER BY [Parcel_Number]"
rsPCL.Open qPCL, "DSN=;UID=;PWD="
%>
<form method="POST" name="azlienmain2" action="azlienmain2.asp">
Parcel Prefix:
<font face="Arial" size="2">
<select name="parcel">
<%while NOT rsPCL.EOF%>
<option value="<%=rsPCL("parcel"
<%=rsPCL("parcel"
</option>
<%
rsPCL.MoveNext
wend
%>
</select>
</font>
</td>
Thanks in advance!
-Jim