Hi,
I am trying to return a resultset from a function and not sure how to do it but below is the function I created.
create or replace function sp_servicer_pie chart_testing()
returns varchar
as
$$
select top 10 * from data where r='xxx'
$$
language sql immutable;
when executing it getting the below error:
Final SELECT must return exactly one column.
Can some one help me?
thanks.
I am trying to return a resultset from a function and not sure how to do it but below is the function I created.
create or replace function sp_servicer_pie chart_testing()
returns varchar
as
$$
select top 10 * from data where r='xxx'
$$
language sql immutable;
when executing it getting the below error:
Final SELECT must return exactly one column.
Can some one help me?
thanks.
Comment