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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ali_a
Frequent Visitor

help with oracle query for date type

I have a function has three parameters as you can see below in the code of oracle query. I want to pass the date as a parameter but not working as this one&nbsp '"&DueDate&"' if I add date without parameter will be work as this one

 

'31122018'
SELECT SUM
(db.acc_data.get_mat(c.brnch_No,
c.ContractNo,
db.dat (db.dtpkg.g2h (TO_DATE ('"&DueDate&"','ddmmyyyy'))))) as sum
FROM db.brnchtable c
WHERE (acc.get_brnchtype (c.brnch_No) = 1)

 

now I want to use the date as a parameter. I need your help 🙂


more info about '"&DueDate&"' not show data 🙂

 

test1.PNG

 

test2.PNG

 

1 ACCEPTED SOLUTION
ali_a
Frequent Visitor

I solved the problem by using the Advanced Editor 

View solution in original post

3 REPLIES 3
ali_a
Frequent Visitor

I solved the problem by using the Advanced Editor 

How did u solve this problem I am facing the same issue please help.

v-juanli-msft
Community Support
Community Support

Hi @ali_a 

DueDate is a parameter created in Power BI or in Oracle?

What is its type?

 

This code is correct or not?

'31122018'
SELECT SUM
(db.acc_data.get_mat(c.brnch_No,
c.ContractNo,
db.dat (db.dtpkg.g2h (TO_DATE ('"&DueDate&"','ddmmyyyy'))))) as sum
FROM db.brnchtable c
WHERE (acc.get_brnchtype (c.brnch_No) = 1)

If it is not correct, how about use this code

TO_DATE ("&DueDate&",'ddmmyyyy')

Best Regards
Maggie

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors