Category Archives: SqlServer

SQL Server view or table-valued function? [duplicate]

Questions: This question already has an answer here: reuse sql with view or function 4 answers Answers: Although any view can almost trivially be converted to an inline table-valued function, the converse is not true. If the construct needs to be parametrized, then use an inline table-valued function. Inline table-value functions are basically parametrized views… Read More »

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown in angularjs

Questions: I have spent couple of weeks for this issue. but still I can’t resolve this issue. i am calling a web API service by using http in angularjs $http({ method: ‘GET’, url: rootUrl + ‘/api/Project/ProjectList’, headers: { ‘Content-Type’: “application/json; charset=utf-8” } }).success(function (response) { $scope.ProjectList = response; }).error(function (response, errorCode) { if (errorCode ==… Read More »

Sort order of an SQL Server 2008+ clustered index

Questions: Does the sort order of a SQL Server 2008+ clustered index impact the insert performance? The datatype in the specific case is integer and the inserted values are ascending (Identity). Therefore, the sort order of the index would be opposite to the sort order of the values to be inserted. My guess is, that… Read More »

Why the Full-Text indexing option is greyed out?

Questions: I installed SQL Server 2008 Express with Advanced Services, but when I try to create a new database, the option Full-Text indexing is greyed out, I believe the full-text indexing has been installed, because I did a query as below: use [mydbname] select fulltextserviceproperty(‘isfulltextinstalled’) This query returns 1, so I think it has been… Read More »

How to improve performance for datetime filtering in SQL Server?

Questions: I have a problem with filtering by datetime columns. I tried these two methods: datefield < ‘2013-03-15 17:17:55.179’ datefield < CAST(‘2013-03-15 17:17:55.179’ AS datetime) I have a large database with over 3.000.000 main objects. So I need to improve performance for my datetime filtering. I was reading about UNIX timestamp (convert all datetime to… Read More »

What is USING in SQL Server 2008 MERGE syntax?

Questions: Jacob asked the perfect question: give me the MERGE syntax. Every answer out there immediately jumps to the most complicated case they can think of; obscuring the syntax with extraneous confusion. Marc gave an answer: MERGE member_topic AS target USING someOtherTable AS source ON target.mt_member = source.mt_member AND source.mt_member = 0 AND source.mt_topic =… Read More »