Start a new topic

End of Exasol Script is not recognized by DB Visualizer

I create a script in Exasol:

  

CREATE OR REPLACE R SCALAR SCRIPT plusone(x INT) 
RETURNS INT AS 
run <- function(ctx) {
 ctx$x+1
}
/

select plusone(5);

The scripts ends at the / character, but DB Visualizer executes everything including the SELECT command.

1 Comment

Johannes, 


DbVisualizer uses the semicolon character ; to detect where statement ends. 


Try using an SQL Block SQL Block as follows:


--/
CREATE OR REPLACE R SCALAR SCRIPT plusone(x INT) 
RETURNS INT AS 
run <- function(ctx) {
 ctx$x+1
}
/

select plusone(5);


The character --/ and / represents the start and end of the SQL block. For more information see the User Guide section Executing Complex Statements.Executing Complex Statement


Regards


Ulf

Login or Signup to post a comment