Click here to Skip to main content
       

Database

 
GeneralRe: compare performance between two query PinmvpEddy Vluggen5-Apr-13 9:04 
QuestionJOIN 3 Tables PinmemberRichard.Berry1004-Apr-13 19:01 
AnswerRe: JOIN 3 Tables PinprofessionalMycroft Holmes4-Apr-13 20:04 
GeneralRe: JOIN 3 Tables PinmemberRichard.Berry1005-Apr-13 2:49 
GeneralRe: JOIN 3 Tables PinprofessionalMycroft Holmes5-Apr-13 13:12 
GeneralRe: JOIN 3 Tables [modified] PinmemberRichard.Berry1005-Apr-13 23:41 
GeneralRe: JOIN 3 Tables PinprofessionalMycroft Holmes6-Apr-13 14:14 
QuestionSQL QUERY Pinmembergirijeshkumar3-Apr-13 20:08 
plz help me am begginner to ms sql server
 
my question mulitple rowwise data should be display to one columnwise
 
suppose from table1 i created column like empname,reference
 
table2 i created column like reference and salary details
 
join both table retrieve and display empname, reference,and all salary details for particular employee in one column
 

table1 value
-----------------------------|
empname      |   referenceno
-----------------------------|
girijesh      |   111
-----------------------------|
ajay            |   121
-----------------------------|

 
table2 value
-----------------------------------------------------|
referenceno | salary
-----------------------------------------------------|
111            | jan-10000
-----------------------------------------------------|
111            | feb-20000
-----------------------------------------------------|
111            | mar-30000
-----------------------------------------------------|
121            | jan-10000
-----------------------------------------------------|
121            | feb-20000
-----------------------------------------------------|
 
so now result like below
-----------------------------------------------------|
empname   | reference |   salary
-----------------------------------------------------|
girijesh |   111         | jan-10000,feb-20000,mar-30000
-----------------------------------------------------|
ajay      |   121         | jan-10000,feb-20000
-----------------------------------------------------|
i want query to display like above result
AnswerRe: SQL QUERY Pinmemberi.j.russell3-Apr-13 21:36 
GeneralRe: SQL QUERY Pinmembergirijeshkumar3-Apr-13 23:05 
GeneralRe: SQL QUERY Pinmemberi.j.russell4-Apr-13 2:07 
AnswerRe: SQL QUERY PinmemberBernhard Hiller3-Apr-13 21:38 
GeneralRe: SQL QUERY Pinmembergirijeshkumar3-Apr-13 23:07 
AnswerRe: SQL QUERY Pinmemberritesh.gupta55553-Apr-13 22:28 
GeneralRe: SQL QUERY Pinmembergirijeshkumar3-Apr-13 22:58 
GeneralRe: SQL QUERY Pinmemberritesh.gupta555525-Jun-13 2:55 
QuestionSQL QUERY PinmemberDobrobit2-Apr-13 8:41 
AnswerRe: SQL QUERY PinmemberDavid Mujica2-Apr-13 9:12 
AnswerRe: SQL QUERY Pinmemberdjj552-Apr-13 9:17 
AnswerRe: SQL QUERY PinprofessionalRichard Deeming2-Apr-13 10:40 
Questionwhen use of index on view instead of table Pingroupmehdi.sabet2-Apr-13 7:01 
AnswerRe: when use of index on view instead of table Pinmembermark merrens2-Apr-13 7:11 
Questionbenefit of cluster index on view in sql 2008 r2 Pingroupmehdi.sabet2-Apr-13 1:45 
AnswerRe: benefit of cluster index on view in sql 2008 r2 PinmemberSimon_Whale2-Apr-13 1:56 
GeneralRe: benefit of cluster index on view in sql 2008 r2 Pingroupmehdi.sabet2-Apr-13 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.141015.1 | Last Updated 21 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid