SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 error 'independant'
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

AdamWest
Constraint Violating Yak Guru

USA
351 Posts

Posted - 10/03/2012 :  17:23:21  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 10/03/2012 :  17:26:36  Show Profile  Reply with Quote
is VALUE or EDIT_NO field varchar?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000