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
Thoringer
New Member

PBI Oracle Error when trying to get SYSDATE

Hello fellow PBI users,

I try to create a subquery to use further down in my code:
WITH TODAY AS(
SELECT
TO_CHAR(SYSDATE, 'MM-DD-YYYY') "NOW"
FROM DUAL)

So, if you do SELECT * FROM TODAY, you should get a table with Col name "NOW" and value 12-07-2022 as characters (need that to parse in later subqueries)

However, I get this error: "Expression.SyntaxError: Token Comma expected."

The code runs fine in Toad.

As shown in PBIAs shown in PBI

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Thoringer 

 

Please remove the quote around "NOW". 

SELECT 
    TO_CHAR(SYSDATE, 'MM-DD-YYYY') AS NOW
FROM 
    dual

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
Thoringer
New Member

Wow! That was simple! I tried all kinds of acrobatics, but the removal of the qutation marks does work! Thank you a lot!

v-jingzhang
Community Support
Community Support

Hi @Thoringer 

 

Please remove the quote around "NOW". 

SELECT 
    TO_CHAR(SYSDATE, 'MM-DD-YYYY') AS NOW
FROM 
    dual

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

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.