peter

peter

  • NA
  • 320
  • 0

Create a procedure that produce matching data sets

Aug 17 2022 12:58 PM

At present i have the following query. Which produce whole result set of both vehicle Make and Models. I now wish to return only unique Makes of all vehicles initially and when item selected in listview return both list of Makes and corresponding Models 

Result

Make     Ford

Make     Toyota

Make     Honda

Model    Focus

Model    Fiesta


                selectCommand = "SELECT distinct MAKE, MODEL,MODEL_ID,MAKE_ID FROM vehicle_sellor where newvehicle='" & DDL.SelectedValue & "'"

           Note: the where clause here should return all row when DDL.SelectedValue =""

at present it does not!

Also should introduce another where statement for selected Make that returns corresponding Models.


Answers (2)