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!

How to define variables in toad sql script editor - newbie

waqarazeemJan 5 2010 — edited Jan 5 2010
I have just pull out the script of a Function and want to run it on toad SQL editor.

I am little bit confused how to define the VARIABLEs here in toad SQL editor to run my script.

SELECT
NVL(SUM(debit), 0) - NVL(SUM(credit), 0)
INTO l_accountBalance
FROM
GLP_VoucherMaster vm
INNER JOIN GLP_VoucherDetail vd ON vm.GLP_VoucherMaster_ID = vd.GLP_VoucherMaster_ID
INNER JOIN GLP_ChartOFAccounts coa ON vd.GLP_ChartOfAccounts_ID = coa.GLP_ChartOfAccounts_ID
WHERE
vm.isActive = 'Y' AND vd.isActive = 'Y'

-- *** how to define variables in toad sql script editor ***

AND vm.voucherDate < p_cDate
AND coa.AccountCode LIKE p_accountCode || '%';

Thanks
w\
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2010
Added on Jan 5 2010
5 comments
5,782 views