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.
| Author |
Topic |
|
riya.johnson
Starting Member
17 Posts |
Posted - 2010-06-07 : 02:54:08
|
| Hi,I am running this below query on query analysercreate table #list (backup_size decimal (5,4),database_name nvarchar(20),backup_start_date datetime)goinsert #list select cast(backup_size/1024/1024/1024 as decimal(5,4)) "backup_size",database_name,backup_start_date from msdb..backupset where backup_start_date between getdate()-1 and getdate()goselect database_name "DB Name ", count(1) as 'File Count ', sum(backup_size) " Size" from #list where database_name in ('DEPDB','HRMS40','SCMDB') group by database_namego drop table #listgoThe on the results pane, i get the following resultDB Name File Count Size-------------------- ----------- ---------------------------------------DEPDB 94 0.1291HRMS40 94 1.2363 But when i put the same query into database mail, its not showing the right decimal figure in the output as below.DB Name File Count Size -------------------- ----------- ----------------------------------------DEPDB 94 1291HRMS40 94 1.2363Riya Johnson |
|
|
naveengopinathasari
Yak Posting Veteran
60 Posts |
Posted - 2010-06-07 : 03:33:41
|
| Convert the Last Column to VARCHAR and check.Lets unLearn |
 |
|
|
|
|
|
|
|