I have a very long Oracle SQL script that filters for article numbers in multiple places, i.e.:
[...]
where article_nr = 12345
[...]
To avoid adjusting 20 lines of code manually when changing the article, I introduced variables, i.e.:
define article_1 = 12345
[...]
where article_nr = &&article_1
[...]
Now, however, I get an error saying that it's "missing right parenthesis". I did not touch anything regarding a parenthesis, just replaced the 12345 by the variable. Do I have to escape the "&&" somehow?
Sorry for not posting the full code, but its multiple nested selects.
Thanks
EDIT (Working example):
This works:
select * from stores
where
(opening_date >= '21.11.2016')
;
This DOESN'T works (either with one or with two "&"):
define opening = '21.11.2016'
select * from stores
where
(opening_date >= &&opening)
;
==> "missing right parenthesis"