How To: SQL Server Reporting Date Formating
To select a date format, wrap your field value in a format statement
= Format(Fields!DateFieldToFormat.Value,”M/d/yyyy”)
It is as simple as that!
To select a date format, wrap your field value in a format statement
= Format(Fields!DateFieldToFormat.Value,”M/d/yyyy”)
It is as simple as that!
I recently created a SQL database that has to store files as blobs but before doing so a vb.net CLR function performs an MD5 has on the file to store with it. Everything runs great typically except for on occassion a very large file (4MB) will come along and blow the following error, “.NET Framework execution was aborted by escalation policy because of out of memory“.
To date I’ve tried several settings on SQL Server (2005) unsuccessfully so for now the only way I’ve been able to get around this is to run this SQL command:
DBCC FREESYSTEMCACHE ('ALL')
Running the above SQL command allowed memory to be cleared so the file could be loaded.
Previous research has shown possible fixes based around MemToLeave setting of SQL Server which appears to be a major undertaking!
On occasion it is handy to have a SQL snippet to find SQL views in a database that are using a particular table, column, function, or other SQL. Fortunately SQL Server offers several information schema views to help out.
Using the system view INFORMATION_SCHEMA.VIEWS you can query the views definition (think the SQL you used to create the view). It is as simple as searching the system views VIEW_DEFINITION column. See the example below:
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE VIEW_DEFINITION LIKE '%search criteria%'
Similarly you can search stored procedures using the example below:
SELECT ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%search criteria%'
Applies to: MS SQL Server 2005