Viewing 15 posts - 3,871 through 3,885 (of 4,085 total)
Craig Farrell (9/15/2010)
- For these users, they need all items from somewhere else...-- Cross Join to create master list of user/itemcodes
It's actually not a CROSS JOIN, because the value of...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 15, 2010 at 11:14 am
You really should provide TEST DATA. Despite that, I think that this is what you want.
INSERT INTO dbo.Privs(Username, GroupCode, ItemCode, LevelVal)
SELECT DISTINCT p.Username, p.GroupCode, g.ItemCode, g.LevelVal
FROM dbo.Privs AS p
INNER...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 15, 2010 at 11:05 am
Tara-1044200 (9/15/2010)
USE DB1;ALTER TRIGGER.......
USE DB2;ALTER TRIGGER.......
USE DB3;ALTER TRIGGER.......
USE DB4;ALTER TRIGGER.......
'ALTER TRIGGER' must be...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 15, 2010 at 10:42 am
Either Host_Name() or @@SERVERNAME should give you what you need. Host_Name will give you the name of the workstation that initiated the process, @@SERVERNAME will give you the name...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 15, 2010 at 10:39 am
You might get better help faster if you had posted this in the correct forum. While you might find an expert on clustering in a T-SQL forum, you're much...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 14, 2010 at 2:10 pm
Are you really using DTS instead of SSIS?
It would really help to have SAMPLE DATA. Without that, it's really hard to determine the best course of action.
It sounds like...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 13, 2010 at 10:59 am
You must not have included the "GO" statement in your dynamic SQL.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 12, 2010 at 12:04 pm
It's actually fairly easy, because your trigger code doesn't change between databases. Since this is probably only a one-time thing, I would just copy the results of the dynamic...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 11, 2010 at 12:39 pm
Tara-1044200 (9/10/2010)
Hmm thats a pain if i have to add trigger to every database there are more than 400 db's. any trick?
Dynamic SQL. That's how I created triggers on...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 10, 2010 at 2:28 pm
I check BOL and it looks like DROP_TABLE is not valid for server level events. You can only use the following at the server level: ALTER_AUTHORIZATION_SERVER, CREATE_DATABASE, ALTER_DATABASE,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 10, 2010 at 2:02 pm
BOL is SQL Server Books OnLine. If you Google "BOL SQL" and click "I'm feeling lucky" it will take you right there.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 10, 2010 at 11:27 am
Magy (9/10/2010)
ORDER BY
CASE
WHEN @SortSeq = 'asc' AND @SortOrder...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 10, 2010 at 11:00 am
You just need to apply your filter criteria before or as part of the join statement. You can use a CTE to filter the records before the join or...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 10, 2010 at 10:52 am
You'll need to create a DDL Trigger.
CREATE TRIGGER YourTrigger
ON ALL SERVER
AFTER DROP_TABLE
AS
<Your code here.>
You'll need to use the EVENTDATA function to get the command issued to see if the table...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 9, 2010 at 1:08 pm
It actually sounds like the OP wants both a primary and secondary sort for each sort order choice. If that is the case, there are two options:
1) Have...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 9, 2010 at 10:47 am
Viewing 15 posts - 3,871 through 3,885 (of 4,085 total)