I need a stored procedure in firebird 3.0 to return True, False or 1,0 result to check if this person or the record exists in database. If exists the procedure should return true, if not return False, or return 1, if not return 0
This is my procedure but it gives me an error:
Invalid token.
Dynamic SQL Error.
SQL error code = -104
Token unknown - line 10, column 1.
end.
I want to check if the record is exist or not by checking the first name last name and day of birth.
create procedure aa(
v varchar(20),
g varchar(20),
dd date)
as
begin
select fname,lname,bday from STUDENT
where not exists (select fname,lname,bday from STUDENT where fname=:v and lname=:g and bday=:dd)
end
Procedural SQL
chapter of the docs - but it assumes you have a basic understanding of imperative languages programming and it adapts your generic skills to PSQL specifics, but if you don't have those it will not help you.