I'm using SQL Server 2008 and in Visual Studio, in Server Explorer, I can connect to SQL Server running using my computer name, but I can't using 127.0.0.1 or localhost, shouldn't they be the same?
Also when using a connection string in the web.config file for the website I can't connect using localhost, but only with the computer name!...
Hello everyone,
I am using SQL Server 2008 and I need to select all data from one table of one DB into another table of another DB on the same SQL Server instance.
Here is my script using. The server will run out of memory. The data is big -- table is about 50G size on disk. Any easy alternative solution or any solution to lower memory...
I've got these two queries:
SELECT SELECT NamesRecord.NameID, NamesRecord.FulfillmentAddressID NameFulfillmentAddressID, ContractRecord.FulfillmentAddressID, ContractRecord.BillingAddressId
FROM Magnet.dbo.ContractRecord ContractRecord
INNER JOIN Magnet.dbo.NamesRecord NamesRecord
ON NamesRecord.NameId = ContractRecord.DonorId
WHERE ...
Hi,
I am using SQL Query and below are the tables.
Organization
OrgID Name RAOGID RAOID SubGroupID StatusID
1 Org RAOG1 1 NULL NULL 2
2 Org RAO1 NULL 1 NULL 3
3 Org Sub Group1 NULL NULL 1 1
4 Org RAOG2 2 NULL NULL ...
I just installed SQL 2008 on a machine and when I run my website to add some data via a form, the browser says COMPUTER92/SQLSERVER can not login to database "mdbb" (computer 92 is my computer name) its is a valid Login under the server security -> logins for the server and the login COMPUTER92 says under its properties that its mapped t...
Hi
I have problem with SQL Server 2000 and queries that contain a large number of conditions. When these queries are sent to the SQL Server I get one of the following error messages depending on the query (error messages edited for readability):
[Microsoft][ODBC SQL Server Driver][SQL Server]
SqlDumpExceptionHandler:
Process 61 genera...
I'm converting SQL from Teradata to SQL Server
in Teradata, they have the format
SELECT col1, col2
FROM table1
INTO @variable1, @variable2
In SQL Server, I found
SET @variable1 = (
SELECT col1
FROM table1
);
That only allows a single column/variable per statement. How to assign 2 or more variables using a single SELECT statemen...
Hello everyone,
I often see two styles, INSERT select and insert into select, what are the differences? Are they the same?
I am using SQL Server 2008 Enterprise.
Here are two samples.
INSERT california_authors (au_id, au_lname, au_fname)
SELECT au_id, au_lname, au_fname
FROM authors
WHERE State = 'CA'
http://www.sqlteam.com/article...
Hello everyone,
I am using SQL Server 2008. I know if a table has no clustered index, then it is called heap, or else the storage model is called clustered index (B-Tree).
I want to learn more about what exactly means heap storage, what it looks like and whether it is organized as "heap" data structure (e.g. minimal heap, maximum heap)...
Please point me to an example if you know of one.
...
Hi all,
In my development environment, I seek to recreate a production issue we
face with MSSQL 2005. This issue has two parts:
The Problem
1) A deadlock occurs and MSSQL selects one connection ("Connection X") as the 'victim'.
2) All subsequent attempts to use "Connection X" fail (we use connection pooling). MSSQL says "The server fa...
Helo,
My question is I have one Stored Procedure in SQL Server that returns counts of a field. I want to store the results of this Stored Procedure in a variable (scalar?) of a different stored procedure.
sp_My_Other_SP:
CREATE PROCEDURE [dbo].sp_My_Other_SP
@variable int OUTPUT -- The returned count
AS
BEGIN -- SP
SET NOCOUNT ON;
...
Which Join having more I/O and CPU Cycle ?
Hash join or Merge join or Loop join?
...
I'm currently using MSSQL Server 2000 and to design tables, create and alter stored procedures as well as manage users and permissions I'm using Query Analyzer and Enterprise Manager. I also spend an awful lot of time in Visual Studio 2008 and rather jump out to other applications I was wondering if Visual Studio could help me do at leas...
A while back I set up a database under SQL Server 2008 called myDB in Windows XP, then under Logins under the server, I clicked Properties on my computer login name COMP23/Andrew and mapped myDB database to this using dbowner as its rights.
Then I cloned this XP installation as a backup, installed Visa, realising I did not want Vista I ...
Since the business intelligence development studio only seems to come with SQL server discs and you have to install from those discs in order to see the projects inside Visual Studio, are there licensing constraints that I should be aware of? Like only one installation of the business intelligence studio per server?
...
I've been asked to look at a SQL 2005 database that is reporting 'torn page' errors.
I can look up the MsgIDs and so on, but I just need a few pointers interpreting the DBCC CHECKDB output in a more general sense.
In this sample:
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 8...
Hi,
I did a sql import (sql08) and it didn't import PK/FK type information.
It only transfered data and created the tables.
How can I make it do this?
...
According to MSDN, Median is not available as an aggregate function in Transact-Sql. However, I would like to find out whether it is possible to create this functionality (using the Create Aggregate function, user defined function, or some other method).
What would be the best way (if possible) to do this - allow for the calculation of...
I have a stored procedure where i am passing a simple XML :
'<Products><ProductId>1</ProductId><ProductId>2</ProductId></Products>'
I have a @temp table in SQL which has a ProductId Column:
DECLARE @Temp TABLE(
ProductId NVARCHAR(10)
)
I need to write an insert statement which will loop through the ProductId's in the ...