Skip to Main Content

SQL Developer for VS Code

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Date Subsitution not working

Nikolas LauerFeb 11 2025

When trying to define a variable with

define test_date=to_date('31.12.2024','dd.mm.yyyy');

I get the error

An error occurred while running the statement. An unexpected error with the following message occurred: Unexpected token: ( at offset: 24 expected one of: [WHITESPACE, EQUALS]. Retry the request, if the issue persists, report it to product support.

As a workaround I can rewrite as the following.

define test_date='31.12.2024';

select to_date('&test_date','dd.mm.yyyy') from dual;

This post has been answered by Ashley Chen-Oracle on Feb 12 2025
Jump to Answer
Comments
Post Details
Added on Feb 11 2025
4 comments
136 views