Forum Discussion
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 PBI
Hi Thoringer
Please remove the quote around "NOW".
SELECT TO_CHAR(SYSDATE, 'MM-DD-YYYY') AS NOW FROM dualBest Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
2 Replies
- v-jingzhangCommunity Support
Hi Thoringer
Please remove the quote around "NOW".
SELECT TO_CHAR(SYSDATE, 'MM-DD-YYYY') AS NOW FROM dualBest Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. - ThoringerNew Member
Wow! That was simple! I tried all kinds of acrobatics, but the removal of the qutation marks does work! Thank you a lot!