Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

sql server - SQL - all patients who had only dental visits in 2010 -


i have t-sql query that's giving me recent office visit in 2010 wasn't dental visit. relevant part of query is:

and pv.patientvisitid in (                     select max(pv1.patientvisitid)                     patientvisit pv1                     join doctorfacility df1 on pv1.facilityid = df1.doctorfacilityid             join patientvisitresource pvr1 on pv1.patientvisitid = pvr1.patientvisitid                 join doctorfacility dfr on pvr1.resourceid = dfr.doctorfacilityid         pv1.patientprofileid = pp.patientprofileid                     , pv1.visit < '2011-01-01'                 , df1.listname not '%dental%'         )   

now, want flip around recent office visit patients only had dental appointments. keep hitting wall here, though. can bust me through other side? :-)

the clue use not exists

and pv.patientvisitid in (                     select max(pv1.patientvisitid)                     patientvisit pv1                     join doctorfacility df1 on pv1.facilityid = df1.doctorfacilityid             join patientvisitresource pvr1 on pv1.patientvisitid = pvr1.patientvisitid                 join doctorfacility dfr on pvr1.resourceid = dfr.doctorfacilityid         pv1.patientprofileid = pp.patientprofileid                     , pv1.visit < '2011-01-01'                 , df1.listname '%dental%'         )  , not exists ( select 1   patientvisit pv1                     join doctorfacility df1 on pv1.facilityid = df1.doctorfacilityid             join patientvisitresource pvr1 on pv1.patientvisitid = pvr1.patientvisitid                 join doctorfacility dfr on pvr1.resourceid = dfr.doctorfacilityid         pv1.patientprofileid = pp.patientprofileid                     , pv1.visit < '2011-01-01'                 , df1.listname not '%dental%'         ) 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -