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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Add specific columns in a View

Author  Topic 

Quaffer
Starting Member

1 Post

Posted - 2007-10-12 : 22:02:32
Hello

I need some help/guidence with a SQL 2000 view I have been requested to write

The table structure is

[DateTime].........[SEQNO]...[Text]

2007-10-10.12.59.21 1 This is line 1
2007-10-10.12.59.21 2 This is line 2
2007-10-10.12.59.21 3 This is line 3
2007-10-10.13.01.02 1 This is line 1


The view is required to return the DateTime once and all the text joined where the DateTime is the same i.e

[DateTime]...............[Text]

2007-10-10-12.59.21 This is line 1 This is line2 This is line 3

Thanks in advance

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-10-12 : 23:00:34
For SQL 2000, you can use a CSV function (use a space as the separator rather than comma):
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=19647

For 2005, use the method shown in BOL as mentioned in the second to last post in that thread.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -