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. A simple query

A simple query

Scheduled Pinned Locked Moved Database
database
2 Posts 2 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
    sacoskun
    wrote on last edited by
    #1

    Hello, I have a table such as; (A and B are attribute names) A B - - 1 A 1 B 2 B 3 A 5 C 5 A I would like a query that returns me each distinct group of B column with its A column values. For instance; 1, 3, 5 > A 1, 2 > B 5 > C and I would like to be able to do something on each distinct group. (hope that I could be able to point my request) Sarp

    M 1 Reply Last reply
    0
    • S sacoskun

      Hello, I have a table such as; (A and B are attribute names) A B - - 1 A 1 B 2 B 3 A 5 C 5 A I would like a query that returns me each distinct group of B column with its A column values. For instance; 1, 3, 5 > A 1, 2 > B 5 > C and I would like to be able to do something on each distinct group. (hope that I could be able to point my request) Sarp

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      Hi there. Take a look at this article: http://www.sqlteam.com/item.asp?ItemID=2368[^] It describes using the COALESCE function to do something similar to what you're descibing.

      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