Define variable in script
See original GitHub issueHello i have in the same panel query a lot
select x,y from tabA where col1=:param1
UNION
select t,u from tabB where col5=:param1 and col6=:param2
… This works pop upping the variable request panel. sometimes i have to redo the query a lot of time changing only param1 value so i like the possibility to write at the begin of my query something like
def :param1='XXX'
def :param2='YYY'
select x,y from tabA where col1=:param1
UNION
select t,u from tabB where col5=:param1 and col6=:param2
This is useful also if I have to do this on multipl DB so i can copy paste the code in a separate tab change only the value and do the query on another DB.
this syntax can be useful also to remember the last value i used.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Declaring variables | Mastering Linux Shell Scripting
To declare a variable, just type the name you want and set its value using the equals sign ( = ). ... As...
Read more >Unix / Linux - Using Shell Variables - Tutorialspoint
In this chapter, we will learn how to use Shell variables in Unix. A variable is a character string to which we assign...
Read more >Understanding Shell Script Variables
Just about every programming language in existence has the concept of variables - a symbolic name for a chunk of memory to which...
Read more >How to Use Variables in Shell Scripting - LinuxTechi
User Defined Variables ... These variables are defined by users. A shell script allows us to set and use our own variables within...
Read more >BASH Programming - Introduction HOW-TO: Variables
You can use variables as in any programming languages. There are no data types. A variable in bash can contain a number, a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You already can do this with command
set
: @set paramName=paramValue Like this:Is this what you need?
@damaresende
In this case it is simpler and more performant to build the adequate query: