All,
I am running this statement and getting the error below. I am assuming
that the issue is the CLCCHRGE.CCOUNT data type is Varchar and needs to
be converted using a CONVERT clause or a CASE statement but I am not
sure I am on the right path here and if I am then I am not sure of the
syntax.
SELECT CLCHRGE.CCOUNT, CLCHRGE.CPTPRT, CLCHRGE.XCDATE,
CLMSTER.PLNAME, CLMSTER.PFNAME, procdesc, dignosis
FROM CLCHRGE INNER JOIN
CLMATER ON CLCHRGE.CCOUNT = CLMSTER.CCOUNT
WHERE (CLCHRGE.XACDATE BETWEEN '2005-01-01' AND '2005-1-31')
AND (CLCHRGE.CPTPINT = '90801') AND CLCHRGE.CCOUNT in (608685, 477078,
608201, 204739)
order by xacdate, plname desc
Server: Msg 245, Level 16, State 1, Line 1
Syntax error converting the varchar value 'C171913' to a column of data
type int.Try changing this
CLCHRGE.CCOUNT in (608685, 477078,
608201, 204739)
to this
CLCHRGE.CCOUNT in ('608685', '477078',
'608201', '204739')
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||Success!, Thank you for the tip!! You are a Lifesaver!
No comments:
Post a Comment