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. pivot table sqlserver

pivot table sqlserver

Scheduled Pinned Locked Moved Database
helptutorial
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.
  • F Offline
    F Offline
    foryou
    wrote on last edited by
    #1

    Hi all ; I have two tables Table1 and Table 2 (I work with sqlserver 2005) Table 1: champ1---- champ2 ---- champ3 10 ---------- 14---- aaa 10 ---------- bbb----- 15 10 ----------- 13---- ccc Table2 champ1 ------- champ4 -------- champ5 10 -------------wpm -------------- 1000 10 -------------- xcv -------------- 1200 I try to have the following results: field1 ------ yyyy------ bbb -----cccc ------ wpm------ xcv 10----------- 14------------ 15 ------ 13-------- 1000 ----- 1200 I made half with pivot table: field1 yyyy ------ ------ ----- bbb cccc 10----------- --- 14--------- 15 ------ 13 -- but I do not know how to add two columns wpm and xcv help me thank you.

    W 1 Reply Last reply
    0
    • F foryou

      Hi all ; I have two tables Table1 and Table 2 (I work with sqlserver 2005) Table 1: champ1---- champ2 ---- champ3 10 ---------- 14---- aaa 10 ---------- bbb----- 15 10 ----------- 13---- ccc Table2 champ1 ------- champ4 -------- champ5 10 -------------wpm -------------- 1000 10 -------------- xcv -------------- 1200 I try to have the following results: field1 ------ yyyy------ bbb -----cccc ------ wpm------ xcv 10----------- 14------------ 15 ------ 13-------- 1000 ----- 1200 I made half with pivot table: field1 yyyy ------ ------ ----- bbb cccc 10----------- --- 14--------- 15 ------ 13 -- but I do not know how to add two columns wpm and xcv help me thank you.

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

      Without seeing the query you have already built, answering the question is quite difficult, so what's your query like?

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

      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