We help IT Professionals succeed at work.
Get Started

Mysterious Curly Brackets (Braces)

shacho
shacho asked
on
1,621 Views
Last Modified: 2014-05-07
I'm new to Oracle SQL - forgive my ignorance.
I'm trying to understand a fragment of SQL I picked up from a query.
Notice that the last join parameter is contained in curly brackets.
I can't figure out why.
As I understand it {PARAM3} is a commonly used wildcard for the SQL query tool we use.  In a SELECT or WHERE segment of SQL, this wildcard will be replaced with an actual string before it gets sent to the Oracle interpreter.  So {PARAM3} will have turned into something like 123 by the time it gets to the Oracle server.  But this {PARAM3} is in a join.  WHERE A.PARAM3 = 123 would be fine, of course, but LEFT JOIN TBL_B ON A.PARAM3 = 123 makes no sense (to me).  Am I missing something?

SELECT A.ID, B.PRICE
FROM TBL_A A
LEFT JOIN TBL_B B
ON A.PARAM1 = B.PARAM1
AND A.PARAM2 = B.PARAM2
AND A.PARAM3 = B.{PARAM3}
Comment
Watch Question
EE Topic Advisor
CERTIFIED EXPERT
Most Valuable Expert 2014
Awarded 2013
Commented:
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE