Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Conversion failed when converting the varchar value '5,6' to data type int.

$
0
0

Hi,

I am running the query below and it is throwing the following error:  "Conversion failed when converting the varchar value '5,6' to data type int."  I am thinking it has something to do with the IN clause I am using to pull multi-value checkbox parameters associated with the TargetRace_Codes.  I am not an advanced SQL DB programmer and appreciate some assistance with this.

SELECT GGI.IID ID
, G.GrantNum
, PA.ProgramArea
, G.GranteeName
, G.Project
, L2.Description Race
FROM TGrant G
INNER JOIN TGrant_GranteeInfo GGI ON G.IID=GGI.GrantIID
left join TProgramArea PA on G.ProgramAreaIID=PA.IID
right join TLookup L2 on L2.Code=GGI.TargetRace_Codes and L2.FieldName='TargetRace'
WHERE G.GrantType='CSAT'
AND GGI.TargetRace_Codes IN (1,2,3,4,5,6,7)
ORDER BY PA.ProgramArea


Thanks, again!



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>