Hi, I run a query against a SQL table in order to display some reports.
USE reports SELECT device, message
from eventlogs
The problem is that instead of returning the full message of the column i only what something specific. For example in the following DB Device Message ------ -------- server1 | Failed events: The drive on 'server1' at '\\server1\E$' is 96.91% full which exceeds the limit of 95%. Successful Events: The drive on 'server1' at '\\server1\C$' is 63.80% full which is under the limit of 95%.
How can i make it so on the message column only returns the following values? Device Message ------ ------- Server1 E$=96.91%; C$=63.80%
It would be event better that if the value in under 95% then no need to show it.
so far as the format is consistent you can devise a logic using functions above. so in case of inconsistent formats you might have to break it down into batches and apply separate logic to handle each batch
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/