Advertisement
Guest User

get_headings

a guest
Aug 3rd, 2017
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.25 KB | None | 0 0
  1. CREATE OR REPLACE FUNCTION get_headings RETURN VARCHAR2 IS
  2.   l_headings VARCHAR2(4000) := 'row';
  3. BEGIN
  4.   FOR c IN (SELECT DISTINCT col1 FROM test ORDER BY 1)
  5.     LOOP
  6.         l_headings := l_headings||':'||TO_CHAR(c.col1);
  7.     END LOOP;
  8.   RETURN l_headings;
  9. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement