I created 2 tables
DoctorRegistrat ion2
Name varchar(50)
UserId1 varchar(50)
Password1 varchar(15)
Sex varchar(10)
Dob varchar(50)
EmailId varchar(50)
DoctorRegistrat ion1
Country varchar(50)
State varchar(50)
City varchar(15)
Address varchar(200)
ContactNo varchar(50)
AreaOfSpecializ ation varchar(50)
Hospital varchar(50)
ConsultancyTimi ng varchar(50)
OnlineConsultan cy varchar(15)
OnlineAppointme nt( varchar(10)
The thing is I have to select the Name from DoctorRegistrat ion2 table based on AreaOfSpecializ ation & Country in DoctorRegistrat ion1 table. For that I have given the query as
"select d.Name from DoctorRegistrat ion2 d,DoctorRegistr ation1 d1 where d1.Country='" & Trim(ddlCountry .SelectedItem.V alue()) & "'and d1.AreaOfSpecia lization='" & Trim(DropDownLi st2.SelectedIte m.Value()) & "'"
The problem is all names are getting displayed. How can I give the relation for both the tables & make it possible.
DoctorRegistrat ion2
Name varchar(50)
UserId1 varchar(50)
Password1 varchar(15)
Sex varchar(10)
Dob varchar(50)
EmailId varchar(50)
DoctorRegistrat ion1
Country varchar(50)
State varchar(50)
City varchar(15)
Address varchar(200)
ContactNo varchar(50)
AreaOfSpecializ ation varchar(50)
Hospital varchar(50)
ConsultancyTimi ng varchar(50)
OnlineConsultan cy varchar(15)
OnlineAppointme nt( varchar(10)
The thing is I have to select the Name from DoctorRegistrat ion2 table based on AreaOfSpecializ ation & Country in DoctorRegistrat ion1 table. For that I have given the query as
"select d.Name from DoctorRegistrat ion2 d,DoctorRegistr ation1 d1 where d1.Country='" & Trim(ddlCountry .SelectedItem.V alue()) & "'and d1.AreaOfSpecia lization='" & Trim(DropDownLi st2.SelectedIte m.Value()) & "'"
The problem is all names are getting displayed. How can I give the relation for both the tables & make it possible.
Comment