While writing SQL anything preceded with a : is deemed as a variable in Toad.
For example SELECT * FROM employee WHERE department = :v_department
**SAKET MAHESHWARY
**Sr. Java Developer
saket.maheshwary@mikealbert.com
Office 513-354-2744
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:bounce-hrishi14@toadworld.com]
Sent: Friday, May 19, 2017 2:18 AM
To: codetester@toadworld.com
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
Group,
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.
HRISHI
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Code Tester for Oracle Forum notifications altogether.
Code Tester for Oracle - Discussion Forum
Flag
this post as spam/abuse.