Skip to Main Content

SQL & PL/SQL

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!

variables in sql eveloper

hemant_kFeb 23 2024 — edited Feb 23 2024

hi

i am using query as below

select * from tbaadxx.gaxx where acct_opn_date='&dt' and acid='AA12'
union all
select * from tbaadxx.gaxx where acct_opn_date='&dt' and acid='AA12'
for result I have to replace variable '&dt' twice as I have declared it twice the value is same .
any work around to replace &dt with single replace ? 
I have to use many union all .. say moe than 20 

Please help
This post has been answered by Barbara Boehmer on Feb 23 2024
Jump to Answer
Comments
Post Details
Added on Feb 23 2024
7 comments
304 views