We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Using variables in Query — Vertica Forum

Using variables in Query

yehudityehudit Community Edition User

Hi,
get an error when I run the following query:

DO $$
DECLARE
Is_Full_Exect INT;
BEGIN
Is_Full_Exect:= 5;
SELECT stg.new_ncoronavinvestigation,stg.new_labresultid,'stg_Filterednew_LabResult_Is_Full_Exect' AS Update_Source
FROM stg.Filterednew_LabResult stg
WHERE new_labresultid=:Is_Full_Exect;
END;
$$;

I would appreciate your help to recognize my syntex error
TNX

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file