Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Line line is a select statement.

Line line is a select statement.

Scheduled Pinned Locked Moved Database
databasehelp
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vanikanc
    wrote on last edited by
    #1

    hi, I have the following sql. select '00' + 'TESTIN' + '634' + SPACE(56) + '000001' + CHAR(13) + char(10) + '1' I need the 1 on the next line, as I have specified CHAR(13) + char(10). But it does show that way, it still appears on the same line. Any help is appreciated.

    J N I 3 Replies Last reply
    0
    • V vanikanc

      hi, I have the following sql. select '00' + 'TESTIN' + '634' + SPACE(56) + '000001' + CHAR(13) + char(10) + '1' I need the 1 on the next line, as I have specified CHAR(13) + char(10). But it does show that way, it still appears on the same line. Any help is appreciated.

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      So where exactly are you running this? In other words where exactly do you expect this "next line" to show up?

      V 1 Reply Last reply
      0
      • J jschell

        So where exactly are you running this? In other words where exactly do you expect this "next line" to show up?

        V Offline
        V Offline
        vanikanc
        wrote on last edited by
        #3

        Thank you. Sql server 2005

        J 1 Reply Last reply
        0
        • V vanikanc

          hi, I have the following sql. select '00' + 'TESTIN' + '634' + SPACE(56) + '000001' + CHAR(13) + char(10) + '1' I need the 1 on the next line, as I have specified CHAR(13) + char(10). But it does show that way, it still appears on the same line. Any help is appreciated.

          N Offline
          N Offline
          Niju1
          wrote on last edited by
          #4

          Hi char(10) and char(13) will work only when results to text.. it won't work if the results are displayed in grid

          1 Reply Last reply
          0
          • V vanikanc

            hi, I have the following sql. select '00' + 'TESTIN' + '634' + SPACE(56) + '000001' + CHAR(13) + char(10) + '1' I need the 1 on the next line, as I have specified CHAR(13) + char(10). But it does show that way, it still appears on the same line. Any help is appreciated.

            I Offline
            I Offline
            Ingo
            wrote on last edited by
            #5

            vanikanc wrote:

            select
            '00' + 'TESTIN' + '634' + SPACE(56) + '000001' + CHAR(13) + char(10) +
            '1'

            In my eyes this is abuse of SQL. Such things should be done with the software not in a SQL-Script. If you really need to, place to SELECT Statements:

            SELECT '00' + 'TESTIN' + '634' + SPACE(56) + '000001';
            SELECT 1;

            ------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.

            1 Reply Last reply
            0
            • V vanikanc

              Thank you. Sql server 2005

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              vanikanc wrote:

              Sql server 2005

              SQL Server is a database server. The end of line character means nothing in the database. There is no way to 'display' it. So that is not how you are using it. Best I can suppose is that you are running the Microsoft SQL Server Management Studio and it show 'rows' and columns and your value is thus in a row and in a column and it will not display it any other way.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups