Skip to content

Instantly share code, notes, and snippets.

View FembotDBA's full-sized avatar

Lara FembotDBA

  • California
View GitHub Profile
@FembotDBA
FembotDBA / gist:5770317
Created June 13, 2013 00:32
output employee details to create folders
SELECT 'set objShell = CreateObject("Shell.Application") set objFolder = objShell.NameSpace(ParentFolder) objFolder.NewFolder "' +
a1.EMPLOYEE_NAME + '"'
from LU_HR_EMPLOYEES a1
join LU_HR_EMPLOYEE_STATUS a2
on (a1.EMPLOYEEID = a2.EMPLOYEEID and a1.NATIONALID = a12.NATIONALID)
join LU_HR_EMPLOYEE_STUDIO a3
on (a1.EMPLOYEEID = a3.EMPLOYEEID and a1.NATIONALID = a13.NATIONALID)
join LU_HR_STUDIO a4
on (a3.STUDIO_ID = a4.STUDIO_ID)
where a2.STATUS_ID in (3, 1) --active or on leave
@FembotDBA
FembotDBA / gist:5769987
Created June 12, 2013 23:22
Microsoft SQL Server 2005 e-mail if job completes but not the nightly one
USE [DATABASE NAME]
GO
/****** Object: StoredProcedure [etl].[spp_EmailETLComplete] Script Date: 06/12/2000 16:15:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [etl].[spp_EmailETLComplete]
AS
@FembotDBA
FembotDBA / gist:5769863
Last active December 18, 2015 10:39
MicroStrategy Update intelligence cubes
class UpdateCubes
{
public class MSSession : IDisposable
{
private DSSCOMMasterLib.IDSSDataSource _ds;
private DSSCOMMasterLib.IDSSSession _session;
public DSSCOMMasterLib.IDSSDataSource DataSource
{
get
{
@FembotDBA
FembotDBA / gist:5769832
Last active December 18, 2015 10:39
MicroStrategy C# clear all caches
//live strings
string MSTRServer = "SERVERNAME";
string MSTRLogin = "LoginWithAdminRights";
string MSTRPwd = "Password";
int ProjNum = 4; //you would need to get the project number from MSTR
string projectSource = "Project Source Name";
string projectName = "Project Name";
DSSDataSource oServerDS = new DSSDataSource();
oServerDS.Type = EnumDSSDataSourceType.DssDataSourceTypeServer;