Posted - 06/18/2012 : 14:38:50
| One of our developers noticed that when he had an error in a subquery within an if exists statement, he did not get an error message when running the query.
So, in the query below, it doesn't throw an error even though there is an error in the syntax of the subquery. Has anyone seen this? Is this a known problem with TSQL?
select distinct teamRoleID, dbo.prmTeamRole.[name] as teamRoleName
from dbo.prTeam inner join dbo.prmTeamRole on dbo.prTeam.teamRoleID = dbo.prmTeamRole.id
where projectNumber='P00000060' and dbo.prTeam.status = 'A'
and resourceID in
where selected=1 and isvalid = 1
and projectNumber = 'P00000060'
The error is that there is no such field as ID but SQL does not return an error.