Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA 01850: hour must be between 0 and 23

525853Jan 2 2008 — edited Jan 2 2008
Can anyone tell me if the follow SQL query would lead to an ORA 01850: hour must be between 0 and 23 error? I'm getting this error don't not sure if this query is causing it. Any help is appreciated. Thanks.

select
mlh_date_begin,
mat_desc,
mlh_alert_text,
mat_code
from s_mlh_mem_alert_history,
s_mat_member_alert_type
where mlh_mem_uid=f_mem_uid
and mlh_date_begin <= trunc(sysdate)
and ((mlh_date_end > trunc(sysdate)) or
(mlh_date_end is null))
and mat_code=mlh_mat_code
union
select to_date(to_char(
map_date_appeal_initiated,'yyyymmdd')||
map_time_appeal_initiated,'yyyymmddhh24mi')
as mlh_date_begin,
'**Appeal**' as mat_desc,
'Reason: '||nvl(apr_desc,' ')||' | Decision: '||
nvl(ADE_desc,' ')||' | Date: '||
to_char(mev_date,'yyyymmdd')||' '||mev_time
as mlh_alert_text,
'APP' as mat_code
from s_map_mem_appeal,
s_apr_appeal_reason ,
s_ade_appeal_decision ,
s_mev_map_appeal_event
where map_mem_uid=f_mem_uid
and map_appeal_type='SA'
and apr_code(+) = MAP_apr_code
and ade_code(+) = map_ade_code
and mev_map_uid(+)=map_uid
and mev_appeal_event(+) = 'FNLDEC'
union
select to_date(to_char(
aagr_date_initiated,'yyyymmdd')||
aagr_time_initiated,'yyyymmddhh24mi')
as mlh_date_begin ,
'**Grievance**' as mat_desc,
'Source: '||nvl(
decode(AAGR_SOURCE,
'AUTREP','Authorized Representative', 'INTREF','Internal Referral',
'MBR','Member',
'PRVDR','Provider',
'REGAGY','Regulatory Agency',
'ATTNY','Attorney',
'OTH','Other',AAGR_SOURCE),' ')||
' | Issue Type: '||nvl(
decode(AAGR_ISSUE_TYPE,
'GRVNCE','Grievance',
'ADMAPL','Appeal',AAGR_ISSUE_TYPE),' ')||
' | Decision Date: '||AAGR_DATE_OF_DECISION||
' | Grievance Outcome: '||nvl(
decode(AAGR_GRIEVANCE_OUTCOME,
'AGRMBR','AGRMBR',
'AGRPRT','Agree in part with member',
'DISA','Disagree with member',
'NA','Not Applicable',
'NONE','None',
'MBRCRA','Member concern resolved-Avoidable',
'MBRCRU','Member concern resolved-Unavoidable',
'DISPRO','Disagree with provider',
'AGRPMG','Agree with PGM',
AAGR_GRIEVANCE_OUTCOME),' ')||
' | Appeal Decision: '||nvl(
decode(AAGR_APPEAL_DECISION ,
'UPH','Upheld',
'NONE','None',
'OVRAVD','Overturned - Avoidable',
'OVRUNV','Overturned - Unavoidable',
'PRTOAV','Partially Overturned - Avoidable',
'PRTOUN','Partially Overturned - Unavoidable',
'TXCMPL','Texas Complaint form sent',
AAGR_APPEAL_DECISION),' ')
as mlh_alert_text,
'App' as mat_code
from s_wmds_aagr_main
where AAGR_MEM_UID=f_mem_uid
order by mlh_date_begin;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2008
Added on Jan 2 2008
4 comments
1,308 views