Viewing 6 posts - 1 through 6 (of 6 total)
If the servers are linked, you could do this easily, as in this example:
SELECT FirstTable.* from ServerA...Table1 AS FirstTable
INNER JOIN ServerB...Table2 AS SecondTable
ON FirstTable.ID = SecondTable.ID
However, assuming the servers are...
October 10, 2011 at 10:53 am
I have this installed on an XP laptop for testing. Since I typically have a bazillion other things open, all of the SQL Server services are set to disabled/manual...
March 2, 2011 at 3:57 pm
One more little adjustment and that solution also works -
...move the 'tn' after '<tablename>'
So there we are - two answers for the price of one! 😀
-Bob
February 28, 2011 at 12:21 pm
Actually, if you use a UNION only one ORDER BY clause is allowed & it's scope is the entire UNION'd query.
-Bob
February 28, 2011 at 11:52 am
Try this:
USE <databasename>
GO
SELECT * into #maxRemind
FROM
(
SELECT TOP 1 CompanyName, ReminderNo
FROM <tablename>
ORDER BY ReminderNo DESC
) AS TopRemind
GO
SELECT * into #minRemind
FROM
(
SELECT TOP 1 CompanyName, ReminderNo
FROM <tablename>
ORDER BY ReminderNo ASC
) AS BotRemind
GO
SELECT *...
February 28, 2011 at 10:47 am
I think this page may answer your question:
Specifically:
Defining indexed views on partitioned data can further increase the speed and efficiency of your queries. These defined views are called partition-aligned indexed...
February 28, 2011 at 10:00 am
Viewing 6 posts - 1 through 6 (of 6 total)