|
AdamWest
Constraint Violating Yak Guru
USA
302 Posts |
Posted - 10/03/2012 : 17:23:21
|
can't figure out what this error is about.
{"Conversion failed when converting the varchar value 'Independent' to data type int."} code is here>
SELECT ISNULL(PM.NURSING_UNIT, '') NURSING_UNIT , OGEN.DATEONLY(TR_DATETIME) [DATE] , COUNT(DISTINCT PM.PAT_NUMBER) [COUNT] FROM OEN.GEN_M_PATIENT_MAST PM JOIN OTC.THS_T_TRANSACTIONS1 T ON PM.PAT_NUMBER = T.PAT_NUMBER --JOIN OEN.GEN_M_USER U ON U.USER_ID = T.USER_ID WHERE TR_DATETIME BETWEEN @P_START_DATE AND @P_END_DATE -- AND MENU_ID = 11301 AND VALUE > 0 AND EDIT_NO > 0 GROUP BY NURSING_UNIT, OGEN.DATEONLY(TR_DATETIME) ORDER BY OEN.DATEONLY(TR_DATETIME); END ELSE BEGIN |
|