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 2005 Forums
 Transact-SQL (2005)
 Can this be done in TSql ?

Author  Topic 

leoc50
Yak Posting Veteran

54 Posts

Posted - 2012-05-21 : 16:30:39
For the gurus out there:
I have a table like this

table 1
srv db status
srv1 db1 'abc'
srv1 db2 'def'
srv1 db3 'abc'
srv2 db1 'abc'
srv2 db2 'abc'

Can a TSql query give me an output like below; I don't want column 'srv' repeated all the time. (I seem to recall oracle's pl/sql being able but can't remember the syntax)

srv1 db1 'abc'
db2 'def'
db3 'abc'
srv2 db1 'abc'
db2 'abc'


Thanks!

- lec

leoc50
Yak Posting Veteran

54 Posts

Posted - 2012-05-21 : 16:45:49
The equivalent result in Oracle is achieved by their clause 'Break on'

Any suggestions?



- lec
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-05-21 : 16:45:57
Typically that's a reporting function (suppress duplicates) and not something you'd want to do in a query. Are you doing this for a report?
Go to Top of Page
   

- Advertisement -