While writing SQL anything preceded with a : is deemed as a variable in Toad.
For example SELECT * FROM employee WHERE department = :v_department
**Sr. Java Developer
10340 Evendale Drive • Cincinnati • Ohio • 45241
- IMPORTANT CONFIDENTIALITY NOTICE: This document, and any documents accompanying this transmission, contains confidential, legally protected information and is intended only for the person or entity to which it is addressed. If you are not the intended recipient, any disclosure, copying, distribution or the taking of any action in reliance on the contents of this transmission is strictly prohibited. If you receive this transmission in error, please contact the sender and delete or destroy the material/information.**
From: hrishi14 [mailto:email@example.com]
Sent: Friday, May 19, 2017 2:18 AM
Subject: [Code Tester for Oracle - Discussion Forum] Can I create a variable in TOAD/SQL to prompt for a date(s)?
Can I create a variable in TOAD/SQL to prompt for a date(s)?
Thread created by hrishi14
I’m using TOAD to query the Oracle database. My better expertise is in VB.net. I have very little SQL experience.
My question: Can I create a variable in TOAD/SQL to prompt for a date(s)? Here is what I want to do:
Question 1: Enter Beginning Date (user to enter date value that looks like this: 01/01/2015)
Question 2: Enter Ending Date (user to enter ending date value, i.e. 04/30/2015)
I then will need to create two further variables based on these first two to represent the prior years dates (i.e 01/01/2014 and 04/30/2014). I would know how to do this in VB.net. Unfortunately I’m not sure about PL/SQL (or whatever it is that TOAD uses). Can you teach me how to do this?
Thanks for your assistance.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Unsubscribe from Code Tester for Oracle Forum notifications altogether.
Code Tester for Oracle - Discussion Forum
this post as spam/abuse.