易截截图软件、单文件、免安装、纯绿色、仅160KB

Auto process Cube with SQL Agent job

(1)     Connect to the Analysis server, select the database which we want it to be automatically processed. Right click on this database, choose ‘Process’:
(2)     In the opening ‘Process database’ form, click the ‘Script Action to New Query Window’ as below:
(3)     A query form is opened as below, copy all these code.
(4)     Connect to the Database Engine, choose the Jobs node under ‘SQL Server Agent’, right click on this ‘Jobs’ node and select ‘New Job’:
(5)     In the opening ‘New Job’ form, enter a Name and description for this job
(6)     Choose Steps in the left page in the ‘new Job’ form, then click the ‘New’ button to open ‘New Job Setup’ form
(7)     In the ‘New Job Setup’ form, please enter a name for this Step, choose the Type ‘SQL Server Analysis Services Command’, enter the Server, then paste the command in our step(3) in to the Command, and you can select the ‘Advanced’ page in the left page to configure more for this step, like log file.
After you finish the setup of step, click OK return to ‘New Job’ form.
(8)     Choose ‘schedules’ and then click ‘New’ buttons as below:
(9)     In the ‘New Job Schedule’ form, enter a name for this schedule, set the frequency for this job, and set the daily frequency as below, finally, click OK.
(10) Click OK to finish the creation of the job, and it has been added to the agent, it will run the process every day.


相关文档:

深入浅出SQL之左连接、右连接和全连接

上节我们介绍了表连接,更确切的说是inner joins內连接.
  內连接仅选出两张表中互相匹配的记录.因此,这会导致有时我们需要的记录没有包含进来。
  为更好的理解这个概念,我们介绍两个表作演示。苏格兰议会中的政党表(party)和议员表(msp)。
party(Code,Name,Leader)
Code: 政党代码
Name: 政党 ......

2种连接数据库和读取sql文件添加数据库和表

import java.io.*;
import java.sql.*;
public class DBConn {
 private String ADDRESS ;
 private int PORT ;
 private String DBNAME ;
 private String USERNAME ;
 private String PASSWORD ;
 private Connection conn ;
 private PreparedStatement pstmt ;
 pri ......

sql case select

SELECT ID,TITLE,
(SELECT TIMES from CLS_COURSE WHERE CLS_COURSE.ID=CLS_CLASS.COURSEID) AS TIMES,
(SELECT CASE WHEN EXISTS(SELECT *  from CLS_ATDC WHERE CLS_ATDC.CLSID=CLS_CLASS.ID ) THEN (SELECT TOP 1 COURSETIME from CLS_ATDC WHERE CLS_ATDC.CLSID=CLS_CLASS.ID ORDER BY COURSETIME DESC) ELSE 0 ......

动态sql语句基本语法

  
  动态sql语句基本语法    
  1   :普通SQL语句可以用Exec执行    
   
  eg:       Select   *   from   tableName    
                    Exec( ......

SQL server触发器入门1 创建一个简单的触发器

触发器是一种特殊的存储过程,类似于事件函数,SQL Server™ 允许为 Insert、Update、Delete 创建触发器,即当在表中插入、更新、删除记录时,触发一个或一系列 T-SQL语句。
触发器可以在查询分析器里创建,也可以在表名上点右键->“所有任务”->“管理触发器”来创建,不过都是要写 T-SQL ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号