Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PAVAN515
Frequent Visitor

ERROR [HY000] [Oracle][ODBC][Ora]ORA-01843: not a valid month

SELECT /*+ INDEX(POLICY_WORK I_AR_DT) */
"TIPS"."POLICY_WORK"."AGENT_ID" AGENT_ID,
SUM(NVL("TIPS"."POLICY_WORK"."ADJ_RATED_EXPSRE_AMT", 0)) RATED_EXPSRE_AMT,
SUM(NVL("TIPS"."POLICY_WORK"."ADJ_PREM_AMT",0)) FUND_PREM,
SUM(NVL(DECODE("TIPS"."POLICY_WORK"."PRMLGTD_AMT","TIPS"."POLICY_WORK"."ADJ_PRMLGTD_AMT",1,0),0)) COUNT
FROM "TIPS"."POLICY_WORK"
WHERE "TIPS"."POLICY_WORK"."AGENT_ID" = :a_agent_id
AND TO_DATE(TO_CHAR( "TIPS"."POLICY_WORK"."AR_DT",'MM/DD/YYYY') ,'MM/DD/YYYY')
BETWEEN TO_DATE('01/01/'||TO_CHAR(TO_DATE(:a_start_date,'MM/DD/YYYY'),'YYYY'),'MM/DD/YYYY')
AND TO_DATE('01/01/'||TO_CHAR(TO_DATE(:a_end_date,'MM/DD/YYYY'),'YYYY'),'MM/DD/YYYY')
AND ( "TIPS"."POLICY_WORK"."TRAN_ID" > 999 )
GROUP BY "TIPS"."POLICY_WORK"."AGENT_ID"; 

 

 

In this query i'm adding a_agent_id parameter, after try to run the query in powerbi report builder the error showing invalid month, in this query  what is the error

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @PAVAN515 

 

If you provide a specific value for "AGENT_ID" in the query instead, is it able to return correct result without the same error? Let's first check whether this is caused by the parameter or by other parts of the query. 

 

Best Regards,
Community Support Team _ Jing

"TIPS"."POLICY_WORK"."AGENT_ID" = 4555001, this is the value I am entering in my query I am getting positive result only but if I enter the same value into the parameter then it is not working

"agent_id " feild i'm adding this number 4555001 in query  it is working,  in parameter it is not working

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors