0

I am new to VectorWise database.

I need to declare variable and pass value in it same like we do in a SQL Server database. Please help me how to do this in VectoreWise database. I am using Squirrel as SQL client.

I need to do it like we do in SQL Server:

Declare @name varchar (100)
set @name ='ABC'
select @name

Output: ABC

Thom A
  • 88,727
  • 11
  • 45
  • 75
user8205502
  • 90
  • 1
  • 9

1 Answers1

1

I am not particularly familiar with Actian Vector, so I'm not sure if it has a scripting language. I don't see declare as a supported statement.

If you only need a parameter in a single select, you can use a CTE. For your example:

with params as (
      select 'ABC' as name
     )
select params.name
from params;

I'm not sure if this helps you, but it might.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786