I am using SQL Server 2008, and would like to be able to take advantage of something like mySQL's ON DUPLICATE KEY UPDATE clause for INSERT statements
Current legacy code does a delete and subsequent insert that is running into concurrency issues with duplicate key inserts from separate threads:
Here is the error I see in my production...
Hello everyone,
I am using SQL Server 2008 Enterprise on Windows Server 2008 Enterprise. The server runs SQL Server 2008 is machine M1. I have tried using SQL Server Management Studio on machine M2 could be connected to M1. But I can not use another machine M3 to connect to M1. Any ideas what is wrong? I am not sure whether it is the is...
i have a table [Company] with a column [Address3] defined as varchar(50)
i can not control the values entered into that table - but i need to extract the values without leading and trailing spaces. i perform the following query:
SELECT DISTINCT RTRIM(LTRIM([Address3])) Address3 FROM [Company] ORDER BY Address3
the column contain both ...
Hi,
How difficult is to migrate the SharePoint database from SQL Server 2005 to SQL Server 2008. Is just a question of backing up and restore the database in the new server and point MOSS the new server or are there many other steps involved?
Thanks
...
Hi,
I am using SQL Server 2008 CE replication, and seem to be suffering some data loss (i.e. records are not appearing on the CE databases after a full sync).
I am getting the following entries in the application log:
Replication-Replication Merge Subsystem: agent 0033007B-0043-0039-4400-440036003300 failed. Internal error: A read ope...
Which is the best for Microsoft SQL Server 2008? I would like to have information on PIVOT, Triggers, Stored Procedures, CLR integration, Service Broker etc all in one book.
...
I've created a number of tables and stored procedures. There is a login that is assigned to a role that has execute permission. For all but 2 of the stored procedures, everything is working just fine. But, for 2 of them I get the following error:
Msg 15151, Level 16, State 1,
Procedure XX, Line 15
Cannot find the
object 'XX', b...
hey guys i have to import large sized xml data files (some of them 500 mb in size) into sql 2008. i plan to use sqlxml bulk load for the same.
however i am only interested in certain elements of the xml data file, not each and every element. my question is: in the schema file do i need to mention each and every element present in the xm...
Hi,
I was working on reporting and analysis using the Data Mining Add ins for Excel 2007 using SQL Server 2008.
Does any one have any idea if there is something comparable/similar which can be used for data analysis and reporting provided by Oracle??
Let me know if you do and a link would be very helpful :)
Thank you,
J
...
Hi
I wanted a website that has ample amount of SQL (SQL Server 2005 or 2008) related queries to practice at home
Please let me know if you have any idea about the same.
thanks
...
I have 2 views of the form:
--View1
SELECT foo.id AS id FROM foo LEFT JOIN bar ON foo.id = bar.id
--Results
id
1
1
1
2
2
...
--View2
SELECT foo.id AS id FROM foo LEFT JOIN manchu ON foo.id = manchu.id
--Results
id
1
1
1
2
2
...
Now I want to join the two views so that row #1 from View1 is joined to row #1 of View2.
If I...
Hello,
Say i have duplicate rows in my table and well my database design is of 3rd class :-
Insert Into tblProduct (ProductId,ProductName,Description,Category) Values (1,'Cinthol','cosmetic soap','soap');
Insert Into tblProduct (ProductId,ProductName,Description,Category) Values (1,'Cinthol','cosmetic soap','soap');
Insert Into tblProd...
I've got the following View, called ViewGoods:
SELECT
G.Gid,
SI.[$Id] AS FirstSiteInId,
SI.Date AS FirstSiteInDate,
SI.Comments AS FirstSiteInComments,
S.[$Id] AS FirstSiteId,
S.[$Refex] AS FirstSiteRefex,
SI.Client AS ClientId,
C.[$Refex] AS ClientRefex,
CASE WHEN SI.Contract IS NULL THEN (SELECT Contract.[$Id]
...
Hello,
This is my table data :-
Insert Into tblProduct (ProductId,ProductName,Description,Category) Values (1,'Cinthol','cosmetic soap','soap');
Insert Into tblProduct (ProductId,ProductName,Description,Category) Values (1,'Cinthol','cosmetic soap','soap');
Insert Into tblProduct (ProductId,ProductName,Description,Category) Values (1,'...
Let's say I have a table with X and Y values like:
x-1 x-2 x-3
y-1 V=1 v=4 v=6
y-2 V=1 v=4 v=67
y-3 V=2 v=0 v=9
y-4 V=4 v=5 v=62
where the value for x-1, y-1 is 1 and so on.
I need to store all the x value field names, all the y value field names, and all values.
...
As it stands now, the CLR UDTs including HierarchyID aren't supported in Entity Framework 4. HierarchyID.ToString() is useful, but breaks down once any item has 10+ siblings (the basic structure is /3/4/12/ or /3/4/2/ so the 12th node will sort before the 2nd node).
A little more about potential options:
Bring back hierarchyID as ...
Say I already created my database but forgot to save the sql commands do create it.
How could I reverse engineer the code from an already existing database?
I'm using Microsoft SQL Server Express 2008.
...
Dear Friends ,
How can i retrive Microsoft SQL Analysis Server Properties using SQL Query?
Thanks
...
Hi,
I have a few SSRS reports running on SQL Server 2008 Web Edition SP1 on my production web server.
For some reason, CSV and XML export is not offered to me when viewing my reports in the report viewer. This applies to all reports on that server.
As you can see, PDF, Word and Excel still work fine, it's just XML and CSV that are mi...
Hi folks,
I'm trying convert some decimals to varchar, but they are getting rounded.
Can someone tell me why?
declare @UpperLeftLatitude DECIMAL,
@UpperLeftLongitude DECIMAL,
@BottomRightLatitude DECIMAL,
@BottomRightLongitude DECIMAL
SET @UpperLeftLatitude = 38.663
SET @UpperLeftLongitude = -122.857
SET @BottomRightLatit...