-2

I need to hide duplicate cells in the same column with SQL.

My query is:

select invoice_number, position, article_number, quantity 
from orderpos

It returns the following:

enter image description here

I would like it to return:

enter image description here

Thank you so much.

1
SELECT CASE WHEN position = 1
            THEN invoice_number
            ELSE ''
            END invoice_number, 
       position, 
       article_number, 
       quantity 
FROM orderpos
ORDER BY invoice_number, 
         position
  • Thank you so much Akina for answering me – Hajar Mar 20 at 9:25
  • 1
    @Hajar, you should mark it as a solution if it did solve your problem. – Lennart Mar 20 at 10:19

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.