Start a new topic

Using T-SQL Variables

DbVis seems incapable of recognizing variables in t-sql logic. The following results in an error.

DECLARE @tableCount INT = 0;
SET @tableCount = (SELECT COUNT(*) FROM systables)

The error:

 [Code: 137, SQL State: S1000]  Must declare the scalar variable "@tableCount".


Is it not possible to execute T-SQL logic using variables in DbVis?

1 Comment

Hi,


Please check the following how to execute an SQL block in DbVisualizer:


http://confluence.dbvis.com/display/UG100/Executing+Complex+Statements


Regards


Roger

Login or Signup to post a comment