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. Query Help

Query Help

Scheduled Pinned Locked Moved Database
helpdatabase
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.
  • C Offline
    C Offline
    Care Career
    wrote on last edited by
    #1

    Hi I have result set as table name=ID ID1 ID2 ID3 1 3 1 2 6 1 1 1 1 I want output as Name1 Name2 Name3 A C A B D A A A A I have one table for name is Name field of this table are:Id,Name. I m trying query as Select Name.Name as Name1 Name ,Name.Name as Name2 from Name,Name.Name as Name3 from Name inner join ID on Name.ID=ID1 Inner join ID on Name.ID=ID2 inner join ID on Name.ID=ID3 above query is giving error. Plz help in this thanx Care Carrer

    M 1 Reply Last reply
    0
    • C Care Career

      Hi I have result set as table name=ID ID1 ID2 ID3 1 3 1 2 6 1 1 1 1 I want output as Name1 Name2 Name3 A C A B D A A A A I have one table for name is Name field of this table are:Id,Name. I m trying query as Select Name.Name as Name1 Name ,Name.Name as Name2 from Name,Name.Name as Name3 from Name inner join ID on Name.ID=ID1 Inner join ID on Name.ID=ID2 inner join ID on Name.ID=ID3 above query is giving error. Plz help in this thanx Care Carrer

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Man thats ugly, got to be one on the lousiest data structures around. Joins are not going to do it. You will need to use sub selects. select (Select name from name where ID = ID1) name1, (Select name from name where ID = ID2) name2, (Select name from name where ID = ID3) name3 from ID

      Never underestimate the power of human stupidity RAH

      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