I am writing a Ajax Accordion Menu bind to a Database with columns:
TYPE
MODEL
ID (unique identifier)
Multiple MODELS can have the same TYPE.
I am creating a SQL binded to the accordion that returns a list of MODELS but I want distinct TYPES only,
What I have today:
TYPE
Apt - Model 1 room
Apt - Model 2 room
Apt - Model 3 room
What I want is:
TYPE
Apt
Model 1 room
Model 2 room
Model 3 room
Here is the code I have:
"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT PZSMMODEL,
PZTYPE
FROM (SELECT PZSMMODEL,
PZTYPE,
Rownumber() OVER(PARTITION BY PZTYPE ORDER BY PZTYPE) rn
FROM PIEZO) t
WHERE rn = 1" />
<%#DataBinder.Eval(Container.DataItem, "PZ!--removed tag-->
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).