Click here to Skip to main content
15,889,462 members
Home / Discussions / C#
   

C#

 
AnswerRe: Export SQL Server Data to Excel Using C#? Pin
Gerry Schmitz16-Mar-15 14:02
mveGerry Schmitz16-Mar-15 14:02 
Questionhow to open and read .po(translation) file Pin
Member 1140010015-Mar-15 8:07
Member 1140010015-Mar-15 8:07 
AnswerRe: how to open and read .po file Pin
Dave Kreskowiak15-Mar-15 10:01
mveDave Kreskowiak15-Mar-15 10:01 
AnswerRe: how to open and read .po(translation) file Pin
Brisingr Aerowing26-Mar-15 2:40
professionalBrisingr Aerowing26-Mar-15 2:40 
QuestionHow to edit a datagridview/textboxes using tableadapters in c# and sql Pin
Member 1152545314-Mar-15 15:37
Member 1152545314-Mar-15 15:37 
QuestionSaving what items are selected from a listbox. Pin
Chris-222113-Mar-15 17:13
Chris-222113-Mar-15 17:13 
AnswerRe: Saving what items are selected from a listbox. Pin
OriginalGriff14-Mar-15 0:17
mveOriginalGriff14-Mar-15 0:17 
SuggestionRe: Saving what items are selected from a listbox. Pin
Richard Deeming16-Mar-15 2:37
mveRichard Deeming16-Mar-15 2:37 
It probably won't be a problem for this query, but in general this method would interpret the concatenated column as XML. This could lead to errors, or to characters being "entitized".

The fix is fairly simple:
SQL
SELECT Id, Conditions=
   STUFF((SELECT ',' + CONVERT(varchar(10), Condition)
      FROM myTable b
      WHERE b.Id = a.Id
      FOR XML PATH(''), TYPE).value('.', 'varchar(max)'), 1, 1, '')
FROM myTable a
GROUP BY Id

Concatenating Row Values in Transact-SQL[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionSession ended event not properly working Pin
Member 1085025313-Mar-15 11:58
Member 1085025313-Mar-15 11:58 
AnswerRe: Session ended event not properly working Pin
Eddy Vluggen13-Mar-15 12:06
professionalEddy Vluggen13-Mar-15 12:06 
GeneralRe: Session ended event not properly working Pin
Member 1085025313-Mar-15 12:19
Member 1085025313-Mar-15 12:19 
GeneralRe: Session ended event not properly working Pin
Richard Deeming16-Mar-15 2:32
mveRichard Deeming16-Mar-15 2:32 
GeneralRe: Session ended event not properly working Pin
Member 1085025313-Mar-15 12:51
Member 1085025313-Mar-15 12:51 
GeneralRe: Session ended event not properly working Pin
Eddy Vluggen14-Mar-15 3:47
professionalEddy Vluggen14-Mar-15 3:47 
QuestionError When Table has No Records ... Pin
smh139213-Mar-15 9:27
smh139213-Mar-15 9:27 
AnswerRe: Error When Table has No Records ... Pin
phil.o13-Mar-15 11:13
professionalphil.o13-Mar-15 11:13 
QuestionShow Big Number in TextBox Pin
smh139213-Mar-15 1:01
smh139213-Mar-15 1:01 
AnswerRe: Show Big Number in TextBox Pin
Pete O'Hanlon13-Mar-15 1:31
mvePete O'Hanlon13-Mar-15 1:31 
GeneralRe: Show Big Number in TextBox Pin
smh139213-Mar-15 8:27
smh139213-Mar-15 8:27 
AnswerRe: Show Big Number in TextBox Pin
OriginalGriff13-Mar-15 3:13
mveOriginalGriff13-Mar-15 3:13 
GeneralRe: Show Big Number in TextBox Pin
harold aptroot13-Mar-15 5:01
harold aptroot13-Mar-15 5:01 
QuestionProject Architecture Pin
JammoD8712-Mar-15 21:57
JammoD8712-Mar-15 21:57 
AnswerRe: Project Architecture Pin
Eddy Vluggen13-Mar-15 10:54
professionalEddy Vluggen13-Mar-15 10:54 
GeneralRe: Project Architecture Pin
JammoD8715-Mar-15 4:21
JammoD8715-Mar-15 4:21 
AnswerRe: Project Architecture Pin
Subramanyam Shankar17-Mar-15 1:39
professionalSubramanyam Shankar17-Mar-15 1:39 

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.