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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. About SQL Query

About SQL Query

Scheduled Pinned Locked Moved Database
databasesql-serverhelp
3 Posts 3 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.
  • S Offline
    S Offline
    Sasmi_Office
    wrote on last edited by
    #1

    Hi, I am working on MSSQL 2005 I want query help Suppose in table t1, I have field f1 and f2 now the details in the tables are as folows: f1, f2 1 a 1 b 1 c 1 d 1 e I want in my select query I should get the information as follows: f1 f2 1 a,b,c,d,e Can I get this Please help

    W P 2 Replies Last reply
    0
    • S Sasmi_Office

      Hi, I am working on MSSQL 2005 I want query help Suppose in table t1, I have field f1 and f2 now the details in the tables are as folows: f1, f2 1 a 1 b 1 c 1 d 1 e I want in my select query I should get the information as follows: f1 f2 1 a,b,c,d,e Can I get this Please help

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      So if the a,b,c,d,e is a comma separated list in one column, you could write a function to concatenate the result and return it to the query. For details, see: CREATE FUNCTION[^]

      The need to optimize rises from a bad design.My articles[^]

      1 Reply Last reply
      0
      • S Sasmi_Office

        Hi, I am working on MSSQL 2005 I want query help Suppose in table t1, I have field f1 and f2 now the details in the tables are as folows: f1, f2 1 a 1 b 1 c 1 d 1 e I want in my select query I should get the information as follows: f1 f2 1 a,b,c,d,e Can I get this Please help

        P Offline
        P Offline
        PunkIsNotDead
        wrote on last edited by
        #3

        hi!!!!!!! maybe you can use PIVOT[^] statements in SQL server! It's a very useful tool! good luck! ;)

        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