Re: Execute command in PL/pgSQL function not executing

2021-11-19 Thread Abdul Mohammed
Thu, Nov 18, 2021 at 4:24 AM Abdul Mohammed > wrote: > >> The second part tries to use the string to build a pivot table using the >> crosstab function. >> > > Aside from the simple learning curve on how to write functions in > PostgreSQL you also are dealing

Re: Execute command in PL/pgSQL function not executing

2021-11-19 Thread Abdul Mohammed
the return type but got an error along lines of the alias not being recognized. Much regards On Fri, Nov 19, 2021 at 12:59 PM Tom Lane wrote: > Abdul Mohammed writes: > > Sorry for the late response and thank you Pavel for answering. This is my > > first exposure to pgsql, so plea

Re: Execute command in PL/pgSQL function not executing

2021-11-19 Thread Abdul Mohammed
ND; $$ LANGUAGE plpgsql; This gives: CONTEXT: PL/pgSQL function survey_ct() line 15 at RETURN QUERY Regards On Thu, Nov 18, 2021 at 3:44 AM Pavel Stehule wrote: > > > čt 18. 11. 2021 v 12:24 odesílatel Abdul Mohammed < > imonikemoham...@gmail.com> napsal: > >> Hello

Execute command in PL/pgSQL function not executing

2021-11-18 Thread Abdul Mohammed
Hello everyone, Please I am having a problem with a function I am writing. The first part uses a loop that pulls the values from a column and concatenates them into a string. This first part works fine. The second part tries to use the string to build a pivot table using the crosstab function. The