sql split

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lyne_asp
    New Member
    • Aug 2006
    • 20

    sql split

    Hello everybody,

    Please help me on how to split data..In my database I have varchar data(vcProcess) and the value is 1,4,10,15

    How can I split these data, so the output will be
    1
    4
    10
    15

    Thanks
  • lyne_asp
    New Member
    • Aug 2006
    • 20

    #2
    SQL split

    Hello Everybody,

    Please help me on how to split data in SQL. I have varchar data which is vcProcess the value is 1,4,10,15. I want to split these data, so the output should be..
    1
    4
    10
    15

    Thanks

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Originally posted by lyne_asp
      Hello Everybody,

      Please help me on how to split data in SQL. I have varchar data which is vcProcess the value is 1,4,10,15. I want to split these data, so the output should be..
      1
      4
      10
      15

      Thanks
      Hi.

      I usually do such things in the program I am using to query the database, as that is pretty easy. I'm not sure this is easy, if possible.

      It is also a basic rule (1NF) to never put more than one pice of data into a single field. This is a part of the normilazation rules, which you can read about here

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        You have posted your question in the Articles section. I am moving it to the MySQL forum.

        ADMIN

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          It looks like this is a pretty heavy-duty task:



          It's a fairly simple operation for a language such as PHP. Perhaps it would be possible to process the string before/after interacting with the database....

          Comment

          • lyne_asp
            New Member
            • Aug 2006
            • 20

            #6
            I am new in programming and i didn't know that it will affect my program. I've also read that it is possible to split, but I don't know how to, please hep me

            Comment

            • Banfa
              Recognized Expert Expert
              • Feb 2006
              • 9067

              #7
              I see that you accidentally (I am assuming) posted in the Forum and Articles.

              mmccarthy has moved you Article post to the Forum where it should be, I am just merging the 2 threads into 1 to consolidate the discussion of this topic

              Banfa
              Administrator

              Comment

              Working...