I want to test performance of some queries by executing it multiple times in SQL Server Management Studio and comparing statistics. My problem is that this method isn’t accurate because after every query result is displayed and memory use of Management Studio grows up. Important for me is to not increase memory consumption, because return […]
I want to get the six week sundays weekno using the SQL Server 2008.For example i have the November month, date 18, year 2012. The WeekNo of the November month 18 th date is “47”.
I have a piece of script using cursor to sequence rows in a table. For example, the table looks like this, SSN, Kid_SSN, Kid_DOB, Seq# to list every person with 1 or more kids. I want to update Seq# to label each kid as 1,2,3… based on Date Of Birth. I used cursor for update […]
I would like to install SQL Server Reporting Services 2008r2 integrated with Sharepoint. When I am installing it there is a radio box which indicates installation mode. When I choose it for integrated mode then setup gives me an error. It says that I have to try install with another SQL version except SQL advanced. […]
According to MSDN, the memory limit for SQL Server 2008 Standard edition is 64 GB. Does anyone know if this total is for SQL Server only, for each service you run on that instance (SQL, SSAS, SSIS), or a single total that is shared among all services you run within that instance. For example, if […]
I have an ASP.NET application on Server A and a SQL Server on Server B. When running the appliction it calls a stored procedure. This procedure try to bulk insert from a file from a shared folder on Server A, but the following error occured: Cannot bulk load because the file “\serverA_address\sharedFolder\test.txt” could not be […]
Is there a way to optimize this query based on the WHERE filter? I can’t use computed columns for compatibility reasons. Other than that, I accept any suggestion: UPDATE #ATempTable SET SomeTotal = (QuantityA + QuantityB + QuantityC) – (dbo.fmin(dbo.fmax(ISNULL(ValueA,0) ,dbo.fmax(ISNULL(ROUND(ValueB,0),0) , ISNULL(ValueC,0))), ISNULL(round(ValueD,0), 9999999))) WHERE QuantityA + QuantityB + QuantityC > (dbo.fmin(dbo.fmax(ISNULL(ValueA,0) ,dbo.fmax(ISNULL(ROUND(ValueB,0),0) , […]
I have a table Product with the following columns ProductId Name RegistrationDate UnregistrationDate 1 AB 2013-01-01 2013-03-01 2 CD 2013-01-10 2013-03-13 etc I would like to get a list of Registered Products per every month of a year. Example : Year , Month and the number of dealers which are registered and not unregistered. Year […]
Is it msdb, resource, master or local? If I back up my local database against which I run the XEs, would I have backed up my sessions as well? Are there any metadata stored in the system tables too? Thank you all.
I have a sql server database table with columns as shown below : Table1 Id Name ErrorId 1 AB 2 CD 3 AB 3 4 AB 4 I want to get an output something like this : Name IdCount ErrorIdCount ErrorIds AB 3 2 4,3 CD 1 0 0 I wrote a query which looks […]