Click here to Skip to main content
15,901,916 members
Home / Discussions / Database
   

Database

 
GeneralRe: Like Command in SQL Server 2005 Pin
David Skelly3-Jul-09 2:17
David Skelly3-Jul-09 2:17 
GeneralRe: Like Command in SQL Server 2005 Pin
Niladri_Biswas3-Jul-09 7:15
Niladri_Biswas3-Jul-09 7:15 
GeneralRe: Like Command in SQL Server 2005 Pin
Isaac Gordon3-Jul-09 19:08
Isaac Gordon3-Jul-09 19:08 
GeneralRe: Like Command in SQL Server 2005 Pin
Niladri_Biswas4-Jul-09 4:49
Niladri_Biswas4-Jul-09 4:49 
Questiontrigger on system tables Pin
sunit_822-Jul-09 22:54
sunit_822-Jul-09 22:54 
AnswerRe: trigger on system tables [modified] Pin
Niladri_Biswas3-Jul-09 17:29
Niladri_Biswas3-Jul-09 17:29 
GeneralRe: trigger on system tables Pin
sunit_825-Jul-09 22:39
sunit_825-Jul-09 22:39 
QuestionHow SQL View can be used in this scenario Pin
Krishna Aditya2-Jul-09 22:29
Krishna Aditya2-Jul-09 22:29 
Hi Guys,

I am using Datareader in my C# code to get data from db and dumping it into excel sheets. I am able to do it for everyrow correctly (based on the data from the sql view).

I have a problem in one of the sql views.

rolename                        roledesc            roletype         roleuser
----------------------------------------------------------------------
Team Leader (required)   xyzxyz               Primary         Mike
Team Leader (required)   xyzxyz               Backup            Cary
Process Focal                  abcabc               Primary         Jeff
Process Focal                  abcabc               Backup            Dave

As, when i read each row of this using reader i get,
(Team Leader (required) xyzxyz Primary Mike) AND (Team Leader (required) xyzxyz Backup Cary )) in 2 separate rows.

But when i have to dump this data to excel sheet, i have to only dump the Team Leader (required) once and the roleuser should be Mike and next to him Cary.

I mean,

cell1                              cell2            cell3      cell4
----------------------------------------------------------------------
Team Leader (required)   xyzxyz         Mike         Cary
Process Focal                  abcabc         Jeff         Dave

Please help me in modifying the sql view for this.

Tables: rolename, roledesc comes from roledescription table, roletype comes from roletypedescription table, roleuser from username table,

I can explain if the above statements are not clear Smile | :)

Thanks Ramm
AnswerRe: How SQL View can be used in this scenario Pin
Krishna Aditya2-Jul-09 22:41
Krishna Aditya2-Jul-09 22:41 
AnswerRe: How SQL View can be used in this scenario Pin
David Skelly3-Jul-09 2:26
David Skelly3-Jul-09 2:26 
GeneralRe: How SQL View can be used in this scenario Pin
Krishna Aditya3-Jul-09 2:58
Krishna Aditya3-Jul-09 2:58 
GeneralRe: How SQL View can be used in this scenario Pin
David Skelly3-Jul-09 5:57
David Skelly3-Jul-09 5:57 
QuestionFull Text Search in SQL Server 2005 Pin
Isaac Gordon2-Jul-09 18:21
Isaac Gordon2-Jul-09 18:21 
AnswerRe: Full Text Search in SQL Server 2005 Pin
Niladri_Biswas2-Jul-09 18:53
Niladri_Biswas2-Jul-09 18:53 
QuestionComplicated Summation Query Help Pin
JohnQuar12-Jul-09 7:44
JohnQuar12-Jul-09 7:44 
AnswerRe: Complicated Summation Query Help Pin
David Mujica2-Jul-09 8:37
David Mujica2-Jul-09 8:37 
GeneralRe: Complicated Summation Query Help Pin
JohnQuar12-Jul-09 8:44
JohnQuar12-Jul-09 8:44 
QuestionSequential updates Pin
Gymnast1-Jul-09 18:42
Gymnast1-Jul-09 18:42 
AnswerRe: Sequential updates [modified] Pin
Niladri_Biswas1-Jul-09 18:58
Niladri_Biswas1-Jul-09 18:58 
GeneralRe: Sequential updates Pin
Mycroft Holmes1-Jul-09 21:37
professionalMycroft Holmes1-Jul-09 21:37 
GeneralRe: Sequential updates Pin
Niladri_Biswas1-Jul-09 22:17
Niladri_Biswas1-Jul-09 22:17 
GeneralRe: Sequential updates Pin
Mycroft Holmes1-Jul-09 22:42
professionalMycroft Holmes1-Jul-09 22:42 
GeneralRe: Sequential updates Pin
Niladri_Biswas1-Jul-09 23:02
Niladri_Biswas1-Jul-09 23:02 
GeneralRe: Sequential updates Pin
Gymnast2-Jul-09 16:27
Gymnast2-Jul-09 16:27 
QuestionHelp necessary in making Query Pin
Saiyed Alam1-Jul-09 16:28
Saiyed Alam1-Jul-09 16:28 

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

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