DoctorMaster
DRID nvarchar(50)
FirstName nvarchar(100)
LastName nvarchar(100)
Gender bit
Address1 nvarchar(255)
Address2 nvarchar(255)
City nvarchar(100)
Pincode numeric(6,0)
State nvarchar(100)
Country nvarchar(100)
Telephone nvarchar(50)
Mobile nvarchar(50)
EmailID nvarchar(100)
Designation nvarchar(50)
Suffix nvarchar(100)
Language nvarchar(10)
SpecialityId nvarchar(100)
Speciality
SPID nvarchar(12)
Speciality vnarchar(50)
DrClinicDetails
DRID nvarchar(12)
CDID nvarchar(12)
HPID nvarchar(12)
HospitalName nvarchar(50)
Address1 nvarchar(255)
Address2 nvarchar(255)
VisitOn char(1)
weekly nvarchar(15)
monthly datetime
status char(1)
I have
Name_TextBox
Specialty_DropD ownList
Location_DropDo wnList
in my page. According to the data in above 3 controls I have to select the value from DB by using the above 3 tables. The selected should be like below
Name: (by appending FirstName,LastN ame & MiddleName from DoctorMaster)
Gender: From DoctorMaster
Address1: From DrClinicDetails
Phone: (by appending Telephone,Mobil e from DoctorMaster)
Suffix: From DoctorMaster
where
FirstName(from DoctorMaster table)=Name_Tex tBox
Specialty(from specialty table)=Specialt y_DropDownList
Country(from DoctorMaster)=L ocation_DropDow nList
The query I have given in .Net is
Select DM.FirstName||D M.MiddleName||D M.LastName "Doctors Name",DM.Gender ,DC.Address1,DM .Telephone||DM. Mobile "Phone",DM.Suff ix from DoctorMaster DM,DrClinicDeta ils DC,Specialty SP where DM.FirstName='a aa' or SP.Specialty='0 01' or DM.Country='Ind ia' and SP.SPID='001'
Its not working.
DRID nvarchar(50)
FirstName nvarchar(100)
LastName nvarchar(100)
Gender bit
Address1 nvarchar(255)
Address2 nvarchar(255)
City nvarchar(100)
Pincode numeric(6,0)
State nvarchar(100)
Country nvarchar(100)
Telephone nvarchar(50)
Mobile nvarchar(50)
EmailID nvarchar(100)
Designation nvarchar(50)
Suffix nvarchar(100)
Language nvarchar(10)
SpecialityId nvarchar(100)
Speciality
SPID nvarchar(12)
Speciality vnarchar(50)
DrClinicDetails
DRID nvarchar(12)
CDID nvarchar(12)
HPID nvarchar(12)
HospitalName nvarchar(50)
Address1 nvarchar(255)
Address2 nvarchar(255)
VisitOn char(1)
weekly nvarchar(15)
monthly datetime
status char(1)
I have
Name_TextBox
Specialty_DropD ownList
Location_DropDo wnList
in my page. According to the data in above 3 controls I have to select the value from DB by using the above 3 tables. The selected should be like below
Name: (by appending FirstName,LastN ame & MiddleName from DoctorMaster)
Gender: From DoctorMaster
Address1: From DrClinicDetails
Phone: (by appending Telephone,Mobil e from DoctorMaster)
Suffix: From DoctorMaster
where
FirstName(from DoctorMaster table)=Name_Tex tBox
Specialty(from specialty table)=Specialt y_DropDownList
Country(from DoctorMaster)=L ocation_DropDow nList
The query I have given in .Net is
Select DM.FirstName||D M.MiddleName||D M.LastName "Doctors Name",DM.Gender ,DC.Address1,DM .Telephone||DM. Mobile "Phone",DM.Suff ix from DoctorMaster DM,DrClinicDeta ils DC,Specialty SP where DM.FirstName='a aa' or SP.Specialty='0 01' or DM.Country='Ind ia' and SP.SPID='001'
Its not working.
Comment