1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to display query output in below format

Discussão em 'Outras Linguagens' iniciado por Stack, Junho 17, 2021.

  1. Stack

    Stack Membro Participativo

    I tried to display the output in the below format but ends up as below.

    Actual Output required.

    [ name
    --------------------------------------
    | Harry Potter |
    | Ron Weasley |
    | Hermione Granger |
    | Albus Dumbledore |
    | Severus Snape |
    ]


    Screen capture 1

    I got the output as below:

    'select '|'+ right(' '+name,30)+replicate(' ',20) +'|'
    from [sampleDB_for excercise].dbo.plch_characters
    ;'


    [ name
    | Harry Potter |
    | Ron Weasley |
    | Hermione Granger |
    | Albus Dumbledore |
    | Severus Snape |
    ]


    Screen capture 2

    Continue reading...

Compartilhe esta Página