0

when I run the below query

select concat(column1,column2,column3)  as concatcolumn from table

I get an error "ORA-00909:INVALID NUMBER OF ARGUMENTS"

MT0
  • 143,790
  • 11
  • 59
  • 117
Irfan Syed
  • 113
  • 2
  • 10

2 Answers2

3

Concat only takes two arguments. See: http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions026.htm

Use the concatenation operator:

select column1 || column2 || column3 ...
Mark Leiber
  • 3,118
  • 2
  • 13
  • 22
-4
select ([column1]+','+[column2]+','+[column3]) as concatcolumn from table

Try above the query.it may changes on different type of column data type.

Praxis Ashelin
  • 5,137
  • 2
  • 20
  • 46
muthukumar
  • 148
  • 1
  • 10
  • Oracle uses `||` as the string concatenation operator, not `+`; and doesn't enclose column names in square brackets. The OP also hasn't asked for commas between the values. – Alex Poole Apr 28 '15 at 11:52