cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ali_a Frequent Visitor
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

Accepted Solutions
ali_a Frequent Visitor
Frequent Visitor

Re: help with oracle query for date type

I solved the problem by using the Advanced Editor 

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: help with oracle query for date type

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

 

ali_a Frequent Visitor
Frequent Visitor

Re: help with oracle query for date type

I solved the problem by using the Advanced Editor 

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Top Kudoed Authors
Users Online
Currently online: 319 members 3,034 guests
Please welcome our newest community members: