This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- if present, indicates this is a JSONP crosssite invocation ---> | |
<cfparam name="callback" type="string" default=""> | |
<cfparam name="jsonp" type="string" default=""> | |
<!--- your code, variable "result" will be the json data for caller ---> | |
<cfif callback NEQ ''> | |
<!--- JSONP ---> | |
<cfoutput>#callback#(#serializeJSON(result)#);</cfoutput> | |
<cfelseif jsonp NEQ ''> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------------- | |
-- Collection of queries that helps in performance tuning | |
--grant permission to user | |
GRANT VIEW SERVER STATE TO [user_name] | |
------------ based on http://msdn.microsoft.com/en-us/magazine/cc135978.aspx | |
---------- Uncover hidden data to optimize application performance ----------------------- | |
-- * Number of missing indexes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="createExcelObj" access="public" returntype="any" output="false" > | |
<cfset var oExcel = ""> | |
<CFOBJECT ACTION="CREATE" CLASS="Excel.Application" NAME="oExcel" TYPE="COM"> | |
<cfscript> | |
//remove all interactions | |
oExcel.AlertBeforeOverwriting = false; | |
oExcel.AskToUpdateLinks = false; | |
oExcel.PromptForSummaryInfo = false; | |
oExcel.Visible = false; | |
oExcel.DisplayAlerts = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buttonMode = true; | |
useHandCursor = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRANT EXECUTE ON ConcateAll To my_user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE AGGREGATE dbo.ConcatAll(@input NVARCHAR(4000)) | |
RETURNS NVARCHAR(4000) | |
EXTERNAL NAME SQLCLR.ConcatAll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE ASSEMBLY [SQLCLR] | |
FROM 'c:\temp\SQLCLR.dll' | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS (SELECT * FROM sys.assembly_modules WHERE assembly_class='ConcateAll') | |
BEGIN | |
DROP AGGREGATE dbo.ConcateAll | |
END | |
IF EXISTS (SELECT * FROM sys.assemblies WHERE name='SQLCLR') | |
BEGIN | |
DROP ASSEMBLY [SQLCLR] | |
END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sp_configure 'clr enabled', 1 | |
GO | |
RECONFIGURE | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://gist.github.com/467670.js?file=gistfile1.sql"></script> |