Trying to create a function that will return multiple rows from a table if a searchTerm exists anywhere inside one of the columns. (I am new to Postgres.)
 CREATE OR REPLACE FUNCTION dts_getProjects(searchTerm TEXT) RETURNS SETOF project
 AS $$
 SELECT credit_br AS Branch, status FROM job_project
 WHERE credit_br LIKE '%'||searchTerm||'%'
 $$
 language 'sql';
I get this error:
ERROR: column "searchTerm" does not exist LINE 3: ...status FROM job_project WHERE credit_br LIKE '%'||searchTerm||'...
 
     
    