Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ggeorgiou
Starting Member
7 Posts |
Posted - 2010-03-08 : 06:56:55
|
| Hi guys,I have the following SQL, which works fine within SQL server query analyser and can run with no problems.But when I come to running it within .NET c# I get the following error "Ambiguous column name 'ID'."SELECT Department.ID, Authority.ID AS AuthorityID, Department.DivisionID, Department.DepartmentName, Department.Abbreviation, Department.EMailAddress, Department.ContactNameFROM Authority RIGHT OUTER JOIN Division ON Authority.ID = Division.AuthorityID RIGHT OUTER JOIN Department ON Division.ID = Department.DivisionIDWHERE (ID = @ID)ORDER BY Department.DepartmentNameAny help would be much appreciated..Thanks,George |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-03-08 : 07:05:50
|
| WHERE (Department.ID = @ID)PBUH |
 |
|
|
|
|
|