Viewing 15 posts - 106 through 120 (of 1,124 total)
Try changing the delete query to the following.
DELETEU
FROMServerB.DatabaseB.dbo.User U
WHEREEXISTS( SELECT * FROM deleted d WHERE U.ID = d.ID )
--Ramesh
May 28, 2009 at 9:29 am
Just an FYI.., both the methods posted above will give you an approximate value but not the exact value. To get the exact value, you have no option but...
--Ramesh
May 28, 2009 at 9:22 am
Heard about ROW_NUMBER() function with PARTITION BY clause? That's what would do the job here. Here is the sample code from BOL (works on AdventureWorks)
USE AdventureWorks;
GO
WITH OrderedOrders AS
(
...
--Ramesh
May 28, 2009 at 9:00 am
What you are asking is called "Cross Tab" or "Pivot" query, there are many articles on this forum that explains how to write these kind of queries.
Have a...
--Ramesh
May 28, 2009 at 8:55 am
Just a correction, need to add the group by clause to the derived subquery.
update pallet set palllet.qcscore = MaxScore
FROM ( SELECT max(score) as MaxScore, palletid from qcd inner join qch...
--Ramesh
May 28, 2009 at 8:44 am
Tom, I wonder why its not working on your system, it works fine on my machine without granting any explicit permissions on the folder to a normal db_owner user (though...
--Ramesh
May 28, 2009 at 8:37 am
Tom Brown (5/28/2009)
.....
But I'm still getting errors 7399
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error....
--Ramesh
May 28, 2009 at 7:40 am
Assuming that the posted code is just an example and not the real code, the error looks like a configuration issue related to not allowing remote connections on the remote...
--Ramesh
May 28, 2009 at 6:31 am
You need to build dynamic sql and then run the query using EXECUTE statement. For e.g.
DECLARE @sql VARCHAR(MAX), @Table VARCHAR(100)
SET @Table = 'sys.objects'
SET @sql = 'SELECT * FROM '...
--Ramesh
May 28, 2009 at 6:22 am
Labneh (5/27/2009)
i got it... didn't have to use row_number... here it is in case someone is in a crunch
SELECT T1.*
FROM TableName as...
--Ramesh
May 27, 2009 at 10:29 pm
It looks like another running total problem, which has addressed many a times on this forum. And here is one solution by Jeff Moden that performs better than any...
--Ramesh
May 27, 2009 at 10:14 am
Look for ROW_NUMBER() function with PARTITION BY clause...
--Ramesh
May 27, 2009 at 9:59 am
What you are trying to do is to create an indexed view. So, to create an indexed view you have to adhere to the requirements given for creating it.
Here...
--Ramesh
May 27, 2009 at 9:50 am
Once you have the working linked server connection, you just need to reference the objects by using the four-part naming convention. For e.g.
SELECT * FROM MyAccessServer...SomeTable
[/code]
--Ramesh
May 27, 2009 at 9:35 am
I don't think there is an option such as "SELECT Trigger" but there are some system objects that stores the information about when the index/table was read/write/seek/scan etc.
Here is an...
--Ramesh
May 27, 2009 at 9:28 am
Viewing 15 posts - 106 through 120 (of 1,124 total)