2

In T-SQL there is a method, REPLICATE(char,N), which will make a string with N values of a certain character. This is very helpful when querying into JDE.
Does anyone know if there is a DB2 equivalent to this?

5

I believe REPEAT will give you what you are looking for.

First example from the page referenced above:

Example 1: Repeat 'abc' two times to create 'abcabc'.

SELECT REPEAT('abc', 2)
FROM SYSIBM.SYSDUMMY1;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.