Open shwivel opened 3 months ago
You can configure the variable indicator via "database-client.variableIndicator".
Thanks. So I set the character to an ampersand which is what I expect. However, it seems to behave weirdly relative to other software. It seems that if you have the same named variable, in one place as a quoted string and in another as a number, that it will only substitute wherever the same as the first occurrence.
For example, in an Oracle database if I run:
select to_date('01-JUL-'||(&fiscal_year -1)) as aaa,
&fiscal_year as bbb,
'&fiscal_year' as ccc
from dual;
I would expect output like this, which I do, in PL/SQL Developer:
However, using this extension in VS code, column ccc has no substitution:
Ideally the substitution would occur wherever the same named variable exists in the query, regardless of whether it is quoted. It should replace. Is there a way to make this expected behavior (common to all other software afaik) occur with this extension?
I don't know if this is a bug or a feature request. I am trying to use parameters for purposes of substitution variables. In the changelog for this extension there is the following mentioned:
However, the most common characters for denoting such are & and : yet neither work (the user does not get prompted to supply some value for the parameter). In other software, such as dbeaver, there is an area within the settings menu where one can set the character, where depicted below for example:
I am looking for a similar place in Settings where I can set the character to be used for parameters. Or, if parameters are already supported, what character does this extension expect? (supposedly parameters are supported, but there is no mention of how to use them, and the usual characters used to denote parameters don't work)