首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

几个小问题

2012-03-09 
求助几个问题1、在sql中执行Exec master.dbo.xp_fixeddrives可以得到磁盘剩余空间。driveMB 可用空间C22635D

求助几个问题
1、在sql中执行Exec master.dbo.xp_fixeddrives 可以得到磁盘剩余空间。
driveMB 可用空间
C22635
D75430
E130667

但是我想要把结果转换成GB格式,不知道哪些大仙可以指点一下。

2、我想用sql语句获取文件中最新时间,例如E\工作.txt文件,时间为2012-2-1 10:20,将2012-2-1 10:20给查询出来。



[解决办法]

SQL code
declare @t table (drive varchar(2),free decimal(18,4))insert into @tExec master.dbo.xp_fixeddrivesselect drive,free=free/1024 from @t 

热点排行