asked on
sql = "SELECT DISTINCT ChartID, City, FacilityStatus, ID, State FROM tblGeneral " & _
"WHERE tblGeneral.FacilityStatus= 'Open' " & _
"ORDER BY ID ASC NULL LAST, City ASC "
ASKER
ASKER
SELECT distinct ChartID, City, FacilityStatus, ID, State ,case when ID is null then 9999 else ID end as SortID
FROM tblGeneral
WHERE tblGeneral.FacilityStatus= 'Open'
ORDER BY SortID ASC, City ASC
ASKER
sql = "SELECT distinct ChartID, City, FacilityStatus, ID, State, case when ID is null then 9999 else ID end as SortID " & _
"FROM tblGeneral " & _
"WHERE tblGeneral.FacilityStatus= 'Open' " & _
"ORDER BY SortID ASC, City ASC "
SELECT distinct ChartID, City, FacilityStatus, ID, State ,NZ(ID,99999) as SortID
FROM tblGeneral
WHERE tblGeneral.FacilityStatus= 'Open'
ORDER BY SortID ASC, City ASC
SELECT distinct ChartID, City, FacilityStatus, ID, State,coalesce(id,999999) as SortID
FROM tblGeneral
WHERE tblGeneral.FacilityStatus= 'Open'
ORDER BY coalesce(id,999999) ASC, City ASC
ASKER
SELECT distinct ChartID, City, FacilityStatus, ID, State ,NZ(ID,99999) as SortID
FROM tblGeneral
WHERE tblGeneral.FacilityStatus= 'Open'
ORDER BY NZ(ID,99999) ASC, City ASC
ASKER
<%
Dim ChartID, City, ID, State
Response.Write ("<select name = 'ChartID'>")
Response.Write ("<option value=''>-- Click for list of Locations --</option>")
Set objRS = Server.CreateObject("ADODB.Recordset")
sql = "SELECT DISTINCT ChartID, City, FacilityStatus, ID, State, NZ(ID,99999) as SortID " & _
"FROM tblGeneral " & _
"WHERE tblGeneral.FacilityStatus= 'Open' " & _
"ORDER BY NZ(ID,99999) ASC, City ASC "
objRS.Open sql, objConn
While Not objRS.EOF
ChartID = objRS("ChartID")
City = objRS("City")
State = objRS("State")
ID = objRS("ID")
Response.Write "<option value = '" & ChartID & "'>"
Response.Write "VISN " & ID & " -- " & city & ", " & State & "</option>"
objRS.MoveNext
Wend
Response.Write ("</select>")
objRS.Close
%>
HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.
TRUSTED BY