select (case when (SUSPICIOUS_DEATH_SW ='Y' OR NON_ACCIDENTAL_SW = 'Y' OR INJURY_INCONSISTENT_SW = 'Y' OR INJURY_SUSPICIOUS_SW = 'Y' OR CHILD_TOXIC_CHEMICALS_SW = 'Y' OR CAREGIVER_ACTION_SW = 'Y' OR PHYSICAL_ABUSE_SW = 'Y' ) THEN 'Physical Abuse' When (SEXUAL_MOLESTATION_SW ='Y' OR SEXUAL_ACT_SIBLINGS_SW ='Y' OR SEXUAL_EXPLOIT_CAREGIVER_SW ='Y' OR SEXUAL_PHY_BEH_SUS_ABUSE_SW ='Y' OR SEXUAL_ABUSE_SW = 'Y' ) THEN 'Sexual Abuse' When ( DEATH_NEGLECT_SW ='Y' OR NON_ORGANIC_FAILURE_SW = 'Y' OR MALNUTRITION_SW = 'Y' OR UNSAFE_HOME_SW = 'Y' OR INADEQUATE_CLOTHING_SW = 'Y' OR INADEQUATE_SUPERVISION_SW = 'Y' OR DISCHARGED_FACILITY_SW = 'Y' OR CAREGIVER_INTERVENE_SW = 'Y' OR MAL_NEG_CHILD_ABANDONED_SW = 'Y' OR CHILD_DISABLED_SW = 'Y' OR CHILD_LEFTALONE_SW = 'Y' OR CHILD_LEFTALONE_LONG_SW = 'Y' OR PRIORDEATH_CHILD_SW = 'Y' OR DRUGEXPOSED_NEWBORN_SW = 'Y' OR SEXUAL_PERPETRATOR_SW = 'Y' OR CAREGIVER_IMPAIRMENT_SW = 'Y' OR UNREASONABLE_DELAY_SW = 'Y' OR NEGLECT_SW = 'Y' OR NEGLECT_SD_SW = 'Y' ) Then 'Neglect' When (CHILD_IMPAIRMENT_FAILURE_SW = 'Y' OR mental_injury_sw= 'Y' ) Then 'Mental Injury - Neglect' When (CHILD_IMPAIRMENT_SW = 'Y' OR mental_injury_sw= 'Y') Then 'Mental Injury - Abuse' END ) maltreatment_type from screening where screening_id = 9000
|Convert DB2 function SecondsSinceFromTimestamp to SQL||2||81|
|I am trying to building a ddl statement off a cobol layout||3||119|
|iSeries DB2 query across local and remote site||4||66|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!