Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151

    Unanswered: Formating of columns in output of a SQL Statement in Query Analyzer

    Hi guys

    I want to format the result of a SQL Statement carried out in the query analyzer. Example:

    suppose that you have this table:

    col1 col2
    ------------------------- -----------------------
    abcdefg bdbsjjdasjdh
    bdfjsjdf hasdasjdasj
    jhsdjhd asjdhashdas
    hasjdhj ahsjdhajshdj

    and I want this output:

    col1 col2
    ---------- ----------------
    abcdefg bdbsjjdasjdh
    bdfjsjdf hasdasjdasj
    jhsdjhd asjdhashdas
    hasjdhj ahsjdhajshdj
    Joel Pérez

  2. #2
    Join Date
    Sep 2003
    Posts
    522
    and the difference is?

  3. #3
    Join Date
    Dec 2003
    Posts
    454
    What is the difference between two outputs?

  4. #4
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151
    above the example is not appearing like I want but I want to delimite the size of a column setting the tool.
    Joel Pérez

  5. #5
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621

    Re: Formating of columns in output of a SQL Statement in Query Analyzer

    Originally posted by joelperez
    Hi guys

    I want to format the result of a SQL Statement carried out in the query analyzer. Example:

    suppose that you have this table:

    col1 col2
    ------------------------- -----------------------
    abcdefg bdbsjjdasjdh
    bdfjsjdf hasdasjdasj
    jhsdjhd asjdhashdas
    hasjdhj ahsjdhajshdj

    and I want this output:

    col1 col2
    ---------- ----------------
    abcdefg bdbsjjdasjdh
    bdfjsjdf hasdasjdasj
    jhsdjhd asjdhashdas
    hasjdhj ahsjdhajshdj
    left(col1,10) ?

  6. #6
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151

    Re: Formating of columns in output of a SQL Statement in Query Analyzer

    Originally posted by snail
    left(col1,10) ?
    yes left function for me!!!

    Thanks!!!
    Joel Pérez

  7. #7
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    ...or use CAST or CONVERT to specify the column widths of the resulting fields.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  8. #8
    Join Date
    Jan 2004
    Location
    Venezuela
    Posts
    151
    Originally posted by blindman
    ...or use CAST or CONVERT to specify the column widths of the resulting fields.
    Thanks for your recommendation blindman
    Joel Pérez

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •