Add parameter to function in query #17838
Unanswered
IgorGanchenko
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Could you help me with this issue, please?
How can I use bindings in this query?
It's necessary to use parameters 'date' as date and 'dateTime' as text
do $$ declare i int:=1; current_id int4; begin SELECT hub_calendar_id into current_id FROM d_calendar_with_shift where "date" = (CURRENT_DATE) -- use it at parameter 1 and daytime = 'night' ; -- use in at parameter 2 --raise notice '%', current_id; for i in 1..14 loop INSERT INTO "stuff_line_shift" ("line_num","fk_d_calendar_with_shift_stuff_line_shift", "isActive") values ( i, current_id, true); end loop; end $$Best regards!
Beta Was this translation helpful? Give feedback.
All reactions