{} in SQL [message #660938] |
Thu, 02 March 2017 02:59 |
|
rahul1982
Messages: 53 Registered: November 2011 Location: Pune
|
Member |
|
|
Hi,
I have below SQL i.e. used for data extraction from source system.
curly brackets {} are observed in SQL statement itself. When i tried to run the SQL I got an error.
Please suggest how can we run the SQL in SQL developer with {} present.
While reading on web, I come to know that {} are used to avoid SQL Injection.
select
col1,
col3,
......
FROM
ARA_ALL,
AD,
PAY,
CASHR,
PAY ,
CEB,
RAB
WHERE
{
ARA_ALL
INNER JOIN AD ON ARA_ALL.RECEIVABLE_APPLICATION_ID = AD.SOURCE_ID
INNER JOIN CASHR ON CASHR.CASH_RECEIPT_ID = ARA_ALL.CASH_RECEIPT_ID
INNER JOIN PAY ON PAY.PAYMENT_SCHEDULE_ID = ARA_ALL.PAYMENT_SCHEDULE_ID
LEFT OUTER JOIN TRX_ALL ON TRX_ALL.CUSTOMER_TRX_ID = ARA_ALL.APPLIED_CUSTOMER_TRX_ID
LEFT OUTER JOIN PAY ON PAY.PAYMENT_SCHEDULE_ID = ARA_ALL.APPLIED_PAYMENT_SCHEDULE_ID
LEFT OUTER JOIN CEB ON
CASHR.REMIT_BANK_ACCT_USE_ID = CEB.BANK_ACCT_USE_ID
}
AND RAB.BATCH_SOURCE_ID(+) = TRX_ALL.BATCH_SOURCE_ID
AND RAB.ORG_ID(+) = TRX_ALL.ORG_ID
AND AD.SOURCE_TABLE = 'RA'
AND AD.SOURCE_TYPE IN ('REC', 'UNAPP', 'ACC', 'UNID', 'OTHER ACC', 'EDISC', 'UNEDISC', 'TAX')
AND ARA_ALL.APPLICATION_TYPE = 'CASH'
Thanks
|
|
|
|
Re: {} in SQL [message #660944 is a reply to message #660942] |
Thu, 02 March 2017 03:28 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Whatever you read on the web about {} I'm pretty sure you misunderstood it.
SQL injection is something you worry about when dynamically constructing SQL statements. Once you have a constructed SQL statement injection stops being an issue.
|
|
|
|
|
|