Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
gagani
Posting Yak Master
112 Posts |
Posted - 2012-07-03 : 05:55:03
|
ORDERID REFNO NAME826190 367472 DARREN LEAROYD826190 367473 DOUGLAS MCLAUGHLIN826187 367467 LEE TOMKINS826187 367468 JAMES NEIL JARDINE826173 367452 PIETER BENJAMIN CLOETE826173 367453 ANDREW ERIC JENKINS826171 367450 JACK SAUNDERS-MILLS826171 367449 STEPHEN JOHN COLLISTERBut I want the query to get the output in the following format:orderid name1 name2826190 DARREN LEAROYD DOUGLAS MCLAUGHLIN826187 LEE TOMKINS JAMES NEIL JARDINE826173 PIETER BENJAMIN CLOETE ANDREW ERIC JENKINS826171 STEPHEN JOHN COLLISTER JACK SAUNDERS-MILLS |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
gagani
Posting Yak Master
112 Posts |
Posted - 2012-07-03 : 09:48:30
|
I am using sql 2000, is there anyway to solve with a query in it? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-11 : 10:29:23
|
are you sure you'll have only 2 names against each orderid? what if there are more than two? still you want only two names in output?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|