随笔分类 -  SQL BI

SQL 时间处理方法 (转)
摘要:1. 当前系统日期、时间 select getdate() 2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值 例如:向日期加上2天 select dateadd(day,2,'2004-10-15') --返回:2004-10-17 00:00:00.000 3. datediff 返回跨两个指定日期的日期和时间边界数。 select datediff(day,'2004-09-01','2004-09-18') --返回:17 4. datepart 返回代表指定日期的指定日期部分的整数。 select DATEPART(month, '2004-10-15') --返回 10 5. datename 返回代表指定日期的指定日期部分的字符串 select datename(weekday, '2004-10-15') --返回:星期五 阅读全文
posted @ 2014-02-17 14:24 ITPCBI 阅读(342) 评论(0) 推荐(0)
使用Linked Server通过SQLServer访问Mariadb
摘要:我们经常在SQLServer之间使用Linked Server以访问远程数据库,但有时会需要访问其它类型数据源,比如MySQL,目前如何连接Mariadb(MySQL被Oracle收购后的分支用于维护其开源性)的文章比较少,我们便以Mariadb为例来简单介绍下. SQLServe提供了通过ODBC建立Linked Server的方法,我们通过此方法和Mariadb建立连接. 阅读全文
posted @ 2014-01-22 20:09 ITPCBI 阅读(2286) 评论(0) 推荐(0)
SSIS Read Oracle on Windows 64bit Server
摘要:We recently had a project reading data from a Oracle database using 'Microsoft OLE DB Provider for Oracle'. But since both of our database and OS are in 64bit version, we usually encoutered an error below: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR. The requested OLE DB provider MSDAORA.1 is not registered -- perhaps no 64-bit provider is available. 阅读全文
posted @ 2013-12-30 21:29 ITPCBI 阅读(368) 评论(0) 推荐(0)
SSAS主动缓存^JK
摘要:SSAS中的主动缓存,的意思就是主动处理类似,当一个条件触发,则cube开始处理维度和度量值聚合,所以主动缓存,可以理解为主动处理。 阅读全文
posted @ 2013-12-24 14:49 ITPCBI 阅读(682) 评论(0) 推荐(0)
SQL Server Database Snapshots
摘要:A database snapshot is a read-only, static view of a SQL Server database (the source database). The database snapshot is transactionally consistent with the source database as of the moment of the snapshot's creation. A database snapshot always resides on the same server instance as its source database. As the source database is updated, the database snapshot is updated. Therefore, the longer a database snapshot exists, the more likely it is to use up its available disk space. 阅读全文
posted @ 2013-12-23 14:39 ITPCBI 阅读(613) 评论(0) 推荐(0)