0

I was playing with SQL Server at Hackerrank and I tried to print some spaces and something else after it.

I tried using the code:

PRINT space(5) + replicate('a',3)

but I didn't get the five spaces, just the three a's.

I also tried using REPLICATE(' ',5), but it also didn't work.

Can anybody please tell me if there is a problem with my SQL code or if it's just a hackerrank problem?

0

1 Answer 1

1

No repro:

PRINT space(5) + replicate('a',3)

outputs the spaces before the a's:

     aaa

Completion time: 2020-03-28T18:06:55.8805131-05:00
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! it probably may be a problem of the web page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.