sql-server-2008

I can't do SELECT FROM SELECT [MS SQL Server]

There is a table of Employees and Departments. It is necessary to find such departments in which the total salary of employee ... he selection list because it is not contained in either the statistical function or the GROUP BY clause. Tell me what to do?

Clearing a large ms sql table

There is a table of >20 million records. It needs to be cleaned up quickly somehow. TRUNCATE is not suitable because the t ... disable all triggers before deleting them. Are there any other options for clearing the table without disabling foreign keys?

Error opening connection to a SQL Server 2008 R2 bank

I'm having a problem opening a connection to a local database in SQL Server 2008 R2. The opening method that is giving error ... ry. The Allow remote connections check in the DB connections configuration is also enabled. Anyone have any ideas to solve?

java error in connection with SQL Server

I'm trying to connect to a sql server Database, but I'm not succeeding. Following connection class and test method: public ... ption e) { e.printStackTrace(); System.out.println(e.getMessage()); } } }

Reduce Log file size

I'm in a saga with my database, today I have an 11GB mdf file and a 77gb log. I have searched in several forums, applied some ... agement (shrink) and via command as SHRINKFILE, the database is already as simple. but nothing makes you reduce, I need help.

Asp.net WebForms. Timeout error exceeded in SQL Server. How to solve?

A ASP.NET WebForms it uses the SQL Server 2008 I'm creating a screen that has a search field that works with the requests AJA ... lic void Dispose() { if (dbConnection != null) dbConnection.Dispose(); } } What could be happening?

How to disable identity with Linked Server?

How to disable identity on Linked Server so as not to generate increment? The server table should be equal to the local base. ... ow: Msg 117, Level 15, State 1, Line 2 The object name contains more than the maximum number of prefixes. The maximum is 2.

Present subquery result and use it for calculation

I need to present a result of a subquery and use the same result to perform a calculation, is it possible to throw it to a va ... E [tableTest].[columnA] = [tableA].[columnA]) as 'Counter' , (@test * 50) as 'Calc' , [tableA].[columnA] FROM tableA