vscode-db2i
vscode-db2i copied to clipboard
SQL Variable view
- Adds new view titled "SQL Variables"
- View can allow the user to see the value of SQL variables, data areas or some SQL statement
- Variables can be added by the user by clicking the variable button in the view header
- Variables can be removed by the user by using the minus button on each variable
- The view is automatically updated when a statement/notebook cell is run
- The view will make a suggestion (marked with a plus) to add a variable to the view after running a statement that returns one row and one column
How to test
Scene 1
-
create or replace variable yourschema.helloworld varchar(10000) ccsid 1208 default 'scooby';
- navigate to
yourschema
in the Schema Browser and expand Variables - right click on your new
helloworld
variable and 'Add' it - expand the variable view and see the variable and value of it there
-
set yourschema.helloworld = 'other value';
and see the value automatically change in the view
Scene 2
- run
select count(*) from sometable
(make sure you can insert into this table) and see the result - expand the Variables view and see a new node with the plus (+) icon (wording includes 'suggestion' on the node)
- click on the suggestion node and see the count variable node appear with the count value
- run
insert into sometime (x, y, z)
and after execution see the count variable increase