Viewing 15 posts - 76 through 90 (of 110 total)
sp_addlinkedserver creates linked server.
If successfull it means that server is running.
Falure can be cauesed by many reasons.
Server not running can be the reason.
Please read BOL.
Regards,
K. Matsumura
June 8, 2007 at 3:49 am
sp_addlinkedserver
returns
0 (success) or 1 (failure)
K. Matsumura
June 8, 2007 at 3:35 am
Thank you, David, for your interesting idea.
But I would have to change all object names in the original function.
I mean I have to add [192.168.1.1].MyDatabase.
It would be to difficult for...
June 7, 2007 at 9:27 pm
Thanks, Jeff.
I will do without UDF.
June 7, 2007 at 6:51 pm
Thanks, Jeff.
Does that mean a UDF cannot be called from a linked server?
June 7, 2007 at 6:14 pm
INSERT INTO #Temp1 (OID, ODATE, OOWNER)
SELECT O_ID,O_DATE,O_OWNER
FROM OData
June 5, 2007 at 1:02 am
I don' think you can UNION an ORDER BYed statement, right?
K. Matsumura
June 4, 2007 at 1:09 am
Maybe this is better
SELECT A.Address, B.accountname, B.emailaddress1, C.Companyname, C.emailaddress1, D.Fullname, D.emailaddress1
FROM #T A
LEFT OUTER JOIN Accountbase B ON B.emailaddress1 = A.Address
LEFT OUTER JOIN Leadbase C ON C.emailaddress1 = A.Address
LEFT OUTER...
June 1, 2007 at 3:08 am
I'm assuming it is SQL 2000.(no CTE
SELECT A.Address, C = COUNT(*) INTO #T FROM
(
SELECT Name = accountname, Address = emailaddress1 FROM Accountbase
UNION ALL SELECT Companyname, emailaddress1 FROM Leadbase
UNION ALL SELECT...
June 1, 2007 at 2:59 am
I run the same test using actual table and got following results:
1 time
NOT IN() : 436ms
AND : 390ms
OUTER JOIN: 360ms
NOT EXISTS: 343ms
10 times
NOT IN() : 3,936ms
AND : 3,923ms
OUTER...
May 29, 2007 at 2:17 am
I run same test against 1,000,000 records and got following results:
1 time
NOT IN() : 390ms
AND : 373ms
OUTER JOIN: 1,876ms
NOT EXISTS: ...
May 29, 2007 at 2:03 am
Another Correction
SELECT *
FROM TableA A
INNER JOIN TableB B ON B.Z_Id = A.Z_Id
AND B.Date = (SELECT MIN(Z.Date) FROM TableB Z WHERE Z.Z_Id = A.Z_Id AND Z.Date >= A.Date)
K. Matsumura
May 28, 2007 at 10:55 pm
Correction
SELECT *
FROM TableA A
INNER JOIN TableB B ON B.Z_Id = A.Z_Id
AND B.Date = (SELECT MIN(Z.Date) FROM TableB Z WHERE B.Date >= A.Date)
K. Matsumura
May 28, 2007 at 10:54 pm
Try
SELECT *
FROM TableA A
INNER JOIN TableB B ON B.Z_Id = A.Z_Id
AND B.Date = (SELECT MIN(Z.Date) FROM TableB Z WHERE B.Date > A.Date)
K. Matsumura
May 28, 2007 at 10:52 pm
Viewing 15 posts - 76 through 90 (of 110 total)