英文:
What do the $ and { } meaning in SQL?
问题
可以有人解释一下在这个SQL中 $P{p_date} 的作用吗?我需要重建SQL查询,但不幸的是我的前同事没有对此进行任何注释。所以,我不理解下面的代码:
SELECT * FROM table_A A INNER JOIN table_B B ON (A.key = B.key AND A.date = $P{p_date});
我认为它可能是将日期值传递给Oracle,但我不确定。
英文:
can anyone explain $P{p_date} do in this SQL. I have to rebuild SQL query but unfortunately my previous coworker doesn't make any comment about it. So, I don't understand the code below:
SELECT * FROM table_A AINNER JOIN table_B BON (A.key = B.keyAND A.date = $P{p_date});
I think it maybe pass date value to in Oracle but I'm not sure.
答案1
得分: 1
这很可能来自于像Jasper Reports或类似的报表工具。
无论如何,它只是在说明这个查询将在运行时接收到一个来自用户的值,因此你的查询等同于:
SELECT *
FROM table_A A
INNER JOIN table_B B
ON (A.key = B.key AND A.date = <某个用户提供的值>);
英文:
That most likely comes from a reporting tool such as Jasper Reports or similar.
In any case, it is simply saying that this query will receive a value from a user at run time, thus your query is equivalent to:
SELECT *
FROM table_A A
INNER JOIN table_B B
ON (A.key = B.keyAND A.date = <some user provided value>);
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论