Skip to Content
0

SQL query with dynamic placeholder

May 29, 2017 at 03:56 PM

31

avatar image
Former Member

I have a hana view with a year placeholder and i would like pass the placeholder in query, for example i can use this sintax?

declare v_year as int;
set v_year = YEAR(CURRENT_DATE);

SELECT * FROM “_SYS_BIC”.”my_view/MY_VIEW”

(‘PLACEHOLDER’ = (‘$$YEAR$$’,”v_year”’))

I wouldn't like create a proc to do a semple select

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers