英文:
What do the $ and { } meaning in SQL?
问题
$P{p_date} 在这个 SQL 中的作用是什么?我必须重建 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>);
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论