Forum Discussion
Anushka96
2 years agoFrequent Visitor
How to insert dynamic content in a query
I'm trying to dynamicaly create plsql query in copy data node. But I can't use set varaible in that dynamic query as per the suggested method in auto completion. Following statement is my sql statement.
SELECT *
FROM (
SELECT a.*, CAST(ROWNUM AS INTEGER) AS rnum
FROM (
SELECT * FROM DBO.TestData
) a
WHERE ROWNUM <= 2000
)
WHERE rnum >= @variables('LastRow')
My Piplineline is like in the picture.
My Piplineline is like in the picture.
- You can use the following dynamic content to build the query. Enclose the parameter within
@{...}(string interpolation) wherever required:
SELECT *FROM (SELECT a.*, CAST(ROWNUM AS INTEGER) AS rnumFROM (SELECT * FROM DBO.TestData) aWHERE ROWNUM <= 2000)WHERE rnum >= @{variables('LastRow')}
- You can use the following dynamic content to build the query. Enclose the parameter within
1 Reply
- NandanHegdeSuper User
- You can use the following dynamic content to build the query. Enclose the parameter within
@{...}(string interpolation) wherever required:
SELECT *FROM (SELECT a.*, CAST(ROWNUM AS INTEGER) AS rnumFROM (SELECT * FROM DBO.TestData) aWHERE ROWNUM <= 2000)WHERE rnum >= @{variables('LastRow')}
- You can use the following dynamic content to build the query. Enclose the parameter within