hi am getting the error when am writing the code as below...
am trying to concatinate all empnames into single line who belongs to same department..
1 DECLARE
2 ex varchar2(200);
3 BEGIN
4 SELECT xmlagg(xmlelement(e,ename,'(',deptno,')',',')) INTO
5 EX FROM EMP WHERE deptno=30;
6 DBMS_OUTPUT.PUT_LINE(EX);
7* END;
QL> /
DECLARE
ERROR at line 1:
ORA-06550: line 4, column 8:
PL/SQL: ORA-00932: inconsistent datatypes: expected CHAR got -
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored
[\code].
please help me..
thanks for all in advance