I am a new guy to Vertica,
now I need to migrate a sql from sqlserver to Vertica,
Declare @SQL varchar(max)SET @SQL ='select c.pid,''Not Exists'' as Pstate from( SELECT '''+REPLACE(@JoinID,',',''' pid UNION ALL SELECT ''')+''' pid ) c where c.pid not in
(SELECT pn_id FROM pytable )'
exec(@SQL)
else
begin
select null as Psatet, null as split
end
How to declare a variable in Vertica and then exec ?
Thank you
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.