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 |
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2012-10-03 : 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 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-03 : 17:26:36
|
is VALUE or EDIT_NO field varchar?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|