Stored proc throwing error
I have a requirement, need to compare data between two tables where each table contain single record and based on validation need to throw an error. I written a stored procedure and when ran it, omg it is showing errors from line 1. I am new to Vertica. Below is the skeleton of my proc. Could you please advice on where I am going wrong?
create or replace procedure proc_name() language PLvSQL AS $$
select col1 into t1_var1,col2 into t1_var2 from tab1;
select col1 into t2_var1,col2 into t2_var2 from tab2;
raise exception 'count not matched'
appreciate your help.