Pre-filled template vairables

Answered

Hi

Trying to make a few scripts i use oftern into templates to save time. in SSMS you could pre-define values for vairables so on the form to fill them in they have a default value e.g. below the "myname" field would autopopulate with "test"

select data from sometable where name ='<myname,,test>'

ive looked around but seams like with VTL if i pre-popluate the variable it disapears from the form e.g. below will show "myname" with a blank

select data from sometable where name ='$myname'

if i populate it using the VTL set command like below the vairable then doesnt show

#set( $myname= "test" ) 
select data from sometable where name ='$myname'

Is there a way to pre-populated with the vairable in VTL?

0
1 comment

Have you tried to use User Parameters (https://www.jetbrains.com/help/datagrip/settings-tools-database-user-parameters.html)?

However, there is no way to define default values for these variables (DBE-15478).

0

Please sign in to leave a comment.