my gridview query builder need to join up to 3 table i have a dropdownlist to show the gridview my dropdownlist is display CompanyDetail.CompanyName
therefore i need to filter the gridview which the CompanyName have only the Job.Name ,and also Company.State, Company.Address
but i tried to link them and pull all the information i want, but i only get back all the data which i keyin which at Job.Name it does not filter up the the which the CompanyName have the Job only
I am not sure I follow your question or requirement completely..but I'll give it a go.
SELECT D.CompanyName, J.Name, D.State, D.Address
FROM Company C
LEFT JOIN CompanyDetail D
ON C.CompnayId = D.CompanyId
LEFT JOIN Job J
ON C.JobId = J.JobId
WHERE D.CompanyName = @CompanyName
Batz
0 Points
3 Posts
Need Help on Database Query Builder Coding
Nov 22, 2012 08:00 AM|LINK
but i tried to link them and pull all the information i want, but i only get back all the data which i keyin which at Job.Name it does not filter up the the which the CompanyName have the Job only
Any1 can help with this Problem?
Basquiat
Contributor
2385 Points
647 Posts
Re: Need Help on Database Query Builder Coding
Nov 22, 2012 09:07 AM|LINK
I am not sure I follow your question or requirement completely..but I'll give it a go.
Batz
0 Points
3 Posts
Re: Need Help on Database Query Builder Coding
Nov 22, 2012 01:00 PM|LINK
Basquiat thx problem resolved.... thx u alot