Viewing 12 posts - 1 through 12 (of 12 total)
use db1
go
update user1.Table1
set user1.Table1.Site = db2.user2.Table2.OrgName
from user1.Table1
inner join db2.user2.Table2 on user1.Table1.site = CONVERT(VARCHAR(10), db2.user2.Table2.OrgId)
April 15, 2005 at 5:04 am
Did you already try with undocumented sp_MSforeachdb?
exec sp_MSforeachdb @command1 = "Print '?'"
That should print out names of all databases.
Unfortunately any fix, service pack or newer version could change behaviour...
April 15, 2005 at 3:23 am
Have a little bit of testcode ready
- creation of a table with 5 recs
- creation of a table with one rec and update trigger on it
- creation of stored...
April 8, 2005 at 10:36 am
Doug,
Am going to pull the query out and see what I can do about indexes. Prestatie table contains about 700.000 records and joins to PrestatieHistoriek which contains about 900.000 records...
April 8, 2005 at 10:06 am
PK is indeed Clustered Index
- Execute Update statement from QA with trigger disabled:
Table 'TransferToepassing'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0.
- Execute Stored proc only...
April 8, 2005 at 9:41 am
Have taken a look at the QA options and IMPLICIT_TRANSACTIONS is not checked, so my QA is operating in autocommit mode.
April 8, 2005 at 9:07 am
The trigger - only for testing purposes looks like this:
CREATE TRIGGER TransferToepassingTriggerBcp ON TransferToepassing FOR UPDATE
AS
DECLARE @TransferToepassingId INT
SELECT @TransferToepassingId = TransferToepassingId FROM INSERTED
EXEC spBcpPrestatie @TransferToepassingId
GO
When I issue following statement
UPDATE TransferToepassing...
April 8, 2005 at 8:44 am
Doug, this is the code for the procedure (I cut out the select statements since they are very long...)
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
if exists (select * from dbo.sysobjects...
April 8, 2005 at 8:38 am
Global table is only accessed by this procedure.
Fired from trigger with update on only one record so proc would be called only once.
Am firing from trigger because that is simpler...
April 8, 2005 at 8:19 am
Mike,
I tried this approach but there was no filename pointing at the floppy drive. I removed the entry and added a new location on logical drive e and took...
April 8, 2005 at 6:42 am
By using sp_addalias you map the login to a specific user, but you don't transfer ownership of objects to this user, which is what you want to achieve.
You can change...
April 8, 2005 at 5:15 am
The popup appears always on the desktop of the production system and in following situations:
- backup from EM on local machine
- backup from EM on other machine with this instance...
April 7, 2005 at 6:48 am
Viewing 12 posts - 1 through 12 (of 12 total)