Reputation: 16002
I routinely execute this statement using Ctrl
- Shift
- F10
in datagrip.
Is there any way to create a SQL or pl/SQL set of statements that contain a variable, and execute the file with DataGrip.
Datagrip's variable handling is not great - or I am missing something.
// somehow set $(jobName?) to a value in the file and re-use it.
update t_msg_log l
set l.job_status = 'FinishedSuccess'
where l.source_detail = $(jobName?)
and created =
(select max(created) from t_msg_log li where li.source_detail = l.source_detail);
Upvotes: 4
Views: 3456
Reputation: 10335
This is called user parameters. The parameter pattern you use isn't described in DataGrip by default. You need to do this yourself.
\$\([^\)\?]+\?\)
Upvotes: 3