I have a table-valued, inline UDF. I want to filter the results of that UDF to get one particular value. When I specify the filter using a constant parameter, everything is great and performance is almost instantaneous. When I specify the filter using a variable parameter, it takes a significantly larger chunk of time, on the order of...
As a follow-up to this question - Is there a way to get the raw XML inside an element that you select using OPENXML? Should I be using an XML datatype instead? Is there a way to get the raw XML with the XML datatype?
...
Hi folks,
i've just created a secondary filegroup and wish to move some tables over to it and then make it read-only.
I'm not sure how to do this?
do i just use the ALTER blah blah TO MyFileGroup ?
...
If you have for instance a datetime datatype set on a column in MSSQLServer2008 that gives you the datecreated, is it better to have the .NET layer pass the current date or set the Default Value or Binding of the column to (getdate())?
...
Hi,
My website doesn't seem to handle a high number of visitors, I believe it's because the server is too simple.
2 hours ago my website was getting a lot of hits and I noticed that 3 deadlock errors occured, the error is:
System.Data.SqlClient.SqlException
:
Transaction (Process ID 58) was deadlocked on lock resources with another p...
I have about 50 tables with created-by and changed-by referencing the user table. When I want to delete the user, I would like to create a list of what tables this user has data in, so one can go delete/edit everything belonging to said user. Is there any way of doing this in SQL?
...
A while back, I installed SQL Server 2008 Express with Advanced Services, which installed SQL Server 2008 Management Studio (SSMS) Express as well. Now that we have SQL 2008 Standard on the network some months later, I want to confirm that I don't have to reinstall SSMS 2008 on my desktop. This blog post I found seems to suggest that I'm...
Hello,
we have a problem to use TransactionScope. TransactionScope get to us very good flexibility to use transactions across our Data Access Layer. On this way we can use transactions implicit or explicit. There are some performance boost again ADO.NET transactions, but at this time this is not really problem. However we have problem ...
Let's say there are 2 tables Table1 { ID, Name, Other } and Table2 { ID, Name, Other }. Both of them have identical records with the same IDs except that in Table1 all Name values are NULL. How can I import Name values from Table2 to Table1 using T-SQL (SQL Server 2008)?
...
There is a table with values like this:
Sets | Reps
-----+------
2 | 10
3 | 15
3 | 12
4 | 8
I need to combine those two values into one in my SELECT statement, so I could get
SELECT ... AS Reps FROM Table
Reps
------------
10,10
15,15,15
12,12,12
8,8,8,8
Any ideas how to do this?
Testing script:
DECLARE @Test TABLE (...
Say, I have a table in the database (SQL Server 2008) with data similar to this
(but much, much bigger):
| ID | SCORE | GROUP |
-----------------------
| 10 | 1 | A |
| 6 | 2 | A |
| 3 | 3 | A |
|----|-------|-------|
| 8 | 5 | B |
|----|-------|-------|
| 4 | 1 | C |
| 9 | 3 | C |
|...
I have the following data :
SectorKey Sector foo
1 A null
2 B null
... ... ...
1 null a
2 null b
2 null c
1 null d
2 null e
... ... ...
I want to update column Sector when it's null based on the value of sectorKey, ie I want Sector t...
Is there a way to perform updates on a PIVOTed table in SQL Server 2008 where the changes propagate back to the source table, assuming there is no aggregation?
...
Can somebody give me some info on SQL Server 2008 Web Edition? Is this a new edition with 2008? What kind of limitations does it have? Is anybody using it successfully? What does it provide that the Express Edition won't?
...
Exception: "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction"
This is hapening inside a SProc running on a machine having both SQL 2005 and Sql 2008 hosted.
The C# code looks something like this
(using TransactionScope t = new TransactionScope ())
{
using(SqlConnection c= ne...
I have a query that runs in about 2-4 minutes on production but runs in a couple of seconds on development. Both of these databases are on the same exact server. (no lectures about dev and production, production is really still in development).
I mean, I can just open two query windows and get the two different results consistently. I ...
Am trying to write a query that would output something similar to the last batch of records below. For sure it works in Reporting Services and Crystal Reports, but just throwing it out here to see if it is possible in SSMS/QA:
Table:
id name amount
-- ---- ------
1 rob 23.00
2 rob 34.00
3 dan 45.00
4 dan 56.00
select name...
I'm implementing tagging on a particular entity, using NHibernate on SQL Server 2008. The structure I have now is, simplifying, like this:
public class Entity {
public Guid Id { get; set; }
}
public class Tag {
public Guid Id { get; set; }
public string Name { get; set; }
}
public class TagAssoc {
public Tag LinkedTag ...
how does one enable full text search for sql server 2008 express in windows vista ?
...
I have Microsoft SQL Server 2008 which we host some databases on. We currently use Windows Integration for authentication.
We are starting to need the support of authenticating scripts from ASP.NET and other applications. These applications need to use "script credentials" as they run without a user logged in. We are not really wanting ...