Michi
Michi

Reputation: 5481

CONCAT function in amazon-redshift

So far I have used the following CONCAT function:

CONCAT('SQL', ' is', ' fun')

However, in redshift I get the error:

ERROR: function concat("unknown", "unknown", "unknown") does not exist

Is there any other function that I could use to replace the CONCAT and get the same result?

Upvotes: 0

Views: 5310

Answers (2)

In RedShift you can concatenate two string with concat(). Try this:

CONCAT('SQL', CONCAT(' is', ' fun'))

Or you can use (||) instead like below:

'SQL' || ' is' || ' fun'

Upvotes: 2

FauconThePonthie
FauconThePonthie

Reputation: 56

I think the problem is in the number of parameters. The function accepts two and you are passing three.

https://docs.aws.amazon.com/redshift/latest/dg/r_CONCAT.html

Upvotes: 1

Related Questions