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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Combine Results into 1

Author  Topic 

baze7
Yak Posting Veteran

58 Posts

Posted - 2010-05-29 : 22:03:41
Is it possible to combined results into 1 result? Let's say the query below returns 2 note records, can I combined then into 1 so I have 1 result?

select notes
from item

where item.item = '1212'

Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-05-30 : 00:40:41
how do you want to combine it ?

Concatenate it ? See concatenate records without UDF


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

baze7
Yak Posting Veteran

58 Posts

Posted - 2010-05-30 : 15:11:10
Does not matter, can be all one string ran together. It is just text.
Go to Top of Page

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-05-31 : 03:06:14
Refer link posted by Khtan

Vaibhav T

To walk FAST walk ALONE
To walk FAR walk TOGETHER
Go to Top of Page

baze7
Yak Posting Veteran

58 Posts

Posted - 2010-05-31 : 10:52:34
oops, sorry missed that link. Thanks!
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-06-01 : 02:09:06
Note that the code from the link works only from version 2005

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

baze7
Yak Posting Veteran

58 Posts

Posted - 2010-06-01 : 09:25:31
I am using 2008. So here is exaclty what I am wanting to do, combined this view to combined all notecontent into 1 result. Possible?

create view mynotes
as
select specificnotes.NoteContent
from
item
left outer join objectnotes on objectnotes.refrowpointer = item.rowpointer
left outer join specificnotes on specificnotes.specificnotetoken = ObjectNotes.specificnotetoken
Go to Top of Page
   

- Advertisement -