Hi,
We have this weird issue regarding SQL Query Notification service.
We have a main web application running with QN service so the cache item in the web get notification from SQL when the monitoring data changed. And it runs well.
What is weird is when the other supporting web service tries to register QN subscription into SQL...
What's the difference between using "SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED" and NOLOCK? Is one better than the other?
...
I admit I'm a bit of a cheapskate, but I don't want to spring for the three servers needed to get automatic failover for SQL Server via Mirroring, especially since one of the three would do nothing other than be a witness server.
If I set up normal SQL replication (snapshot, say) from primary server to backup server, can I just set my c...
We have a database with ~100K business objects in it. Each object has about 40 properties which are stored amongst 15 tables. I have to get these objects, perform some transforms on them and then write them to a different database (with the same schema.)
This is ADO.Net 3.5, SQL Server 2005.
We have a library method to write a single pr...
When will linq to sql be phased out? Is entity frameworks (replacement) released yet?
...
In the past we have been using a summary of historical performance by "Vendor" to decide how we allocate new business to each vendor.
Now what we want to do is to break that summary performance into smaller subsets such geography, size, age, etc to better allocate the new business we hand out to our vendors.
For example, Lets say that ...
I'm experimenting some difficulties trying to use Connection String Builders (ADO.NET) within LINQ to SQL. Let me show you guys what I'm trying to do:
the app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="LoremIpsum"
...
I have a pre-existing desktop application that draws its information from a Microsoft SQL Server. The desktop application is written in C#/ASP/.NET.
I'd like to take this same data and present it in an iPhone application. What would be the best way to obtain and present the data?
...
I am SELECTing a group of records but one column yields distinct values in two or more results. I just want to SELECT the top value; not the Min one or the Max value, but the Top N value encountered by SQL Server 2008. Is there any aggregation mechanism that will perform this?
E.g.
Table has:
Microsoft MSFT 12/21/05Microsoft MSFT 10/...
Hello everybody.
I'm working on a trigger which needs to re-insert its data on another table.
The destination table has a primary key INT NOT NULL WITHOUT Identity, so I have 2 choices:
Calculate the maximum and insert from here.
Take max value from a sequences table.
I use to always create a table variable with identity and inse...
http://stackoverflow.com/questions/1020128/getting-started-with-nhibernate
How can I generate identity fields in nHibernate using Hilo algorithm?
...
I have:
a table with an xml type column (list of IDs)
an xml type parameter (also list of IDs)
What is the best way to remove nodes from the column that match the nodes in the parameter, while leaving any unmatched nodes untouched?
e.g.
declare @table table (
[column] xml
)
insert @table ([column]) values ('<r><i>1</i><i>2</i>...
Is it possible to create an indexed view with SQL Server 2008 which selects from another indexed view?
create view V1 as (select 1 as abc)
create view V2 as (select abc from V1 group by abc)
...
Hi,
For example, if I did:
SELECT * FROM Users WHERE UserId BETWEEN 100 AND 1
what would the results be?
Edit: Sorry, you're right, I should have specified. I didn't want to know the exact number of rows that would return, I just wanted to know if it would return rows that were between 1 and 100 or if it would return rows from min(U...
Hi,
In my database I have a table called ThingsInACircle. Every time a Thing is added to the ThingsInACircle, it gets added with a ThingId that is auto incremented.
Imagine the Things in this table as being in a circle. SELECT Thing FROM ThingsInACircle WHERE ThingId = 10 is next to SELECT Thing FROM ThingsInACircle WHERE ThingId = 11....
here is my Storprocedure
CREATE PROCEDURE [B]
@BoardID varchar(5000)
AS
declare @sB varchar(8000)
set @sB= ' '
Select name,id,address from BoardDetail
WHere IsActive=1 and @sB=@BoardID
GO
here i send string parameter....My @BoardID contain string condition like: name=a and id=5 and address =adfas
i want to supply just string ...
Hi! I'm new to ADO.NET so asking for help. I have to insert large number of records in one table.
What is best-practice, effective and easy way to do that? I found an article called Batch Requests (ADO.NET Data Services Framework) but it isn't clear for me.
Also I found an article about BULK INSERT but such method uses external file, I...
I'm trying to batch insert data into SQL 2008 using SqlBulkCopy.
Here is my table:
IF OBJECT_ID(N'statement', N'U') IS NOT NULL
DROP TABLE [statement]
GO
CREATE TABLE [statement](
[ID] INT IDENTITY(1, 1) NOT NULL,
[date] DATE NOT NULL DEFAULT GETDATE(),
[amount] DECIMAL(14,2) NOT NULL,
CONSTRAINT [PK_statement] PRIMARY KEY CLUSTE...
I am working on a console application to insert data to a MS SQL Server 2005 database. I have a list of objects to be inserted. Here I use Employee class as example:
List<Employee> employees;
What I can do is to insert one object at time like this:
foreach (Employee item in employees)
{
string sql = @"INSERT INTO Mytable (id, name,...