Viewing 15 posts - 4,036 through 4,050 (of 13,469 total)
maybe use the metadata to generate the scripts for you?
this seems to be doing it right?
EXEC sp_msForEachDb 'USE [?];SELECT ''?'' As DbName,''DENY IMPERSONATE ON LOGIN::MyAuditor TO '' + quotename(name) +...
February 7, 2013 at 2:15 pm
Howard i think this has an example of what you want, but i have not done this myself
http://msdn.microsoft.com/en-us/library/ms186710.aspx
A. Denying IMPERSONATE permission on a login
The following example denies IMPERSONATE permission on...
February 7, 2013 at 1:46 pm
Andrew From experience, doing it all in TSQL can get very wordy and long. the headers require a lot of customization to match the shape / number of columns in...
February 7, 2013 at 12:11 pm
a heap table never releases the space that were used by rows that existed, and then were deleted (unless a full table schema lock was applied, like when deleting ALL...
February 7, 2013 at 9:17 am
also, you want to bulletproof the comparison if the value for the Start_Date is changing from null to not null: that's not necessary if the field is not-nullable to begin...
February 7, 2013 at 9:04 am
that syntax error:
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '.'.
shows that your database is currently at Compatibility 80,and needs to be 90 or above, i think:
ALTER DATABASE...
February 7, 2013 at 6:16 am
ok, still sticking with a scalar function, here's a parsename enhancement I slapped together a year and a half ago; it takes an unlimited number of elements:
the original PARSENAME thinks...
February 7, 2013 at 5:43 am
right click on the email message in gmail and view source;
gmail has a lot of anti spam stuff amd mail filtering going on, so i would not be surprised...
February 6, 2013 at 3:19 pm
roughly, the trigger is going to look something like this, but the DDL asked for in the post above would make it definitive:
we don't know what columns you want...
February 6, 2013 at 2:59 pm
excellent job providing the sample DDL and data;
it made it very easy to change.
check out the changes i made to your trigger, i think it does exactly what you wanted:
CREATE...
February 6, 2013 at 2:22 pm
there's a GUI setting for when you Design a table that needs to be changed in this case:
the GUI would drop and recreate, whereas a script might just ADD or...
February 6, 2013 at 1:55 pm
here's just one of many ways to do it: in this case with a scalar function:
SELECT dbo.StripNonNumeric(@NUMERO)
CREATE FUNCTION StripNonNumeric(@OriginalText VARCHAR(8000))
RETURNS VARCHAR(8000)
BEGIN
DECLARE @CleanedText VARCHAR(8000)
;WITH tally (N) as
(SELECT...
February 6, 2013 at 12:28 pm
what is the name of the identity column in the table [tb_lkp_material_prod_version]?
February 6, 2013 at 12:13 pm
njfuller (2/6/2013)
1 or more tb2 records could be inserted.
I would like the identity value from the...
February 6, 2013 at 11:32 am
Scott i suspect you posted some code for MYSQL and not SQL Server.
In SQLServer, the best solution is to enable Full Text Indexing, and use that;
for exact word match, but...
February 6, 2013 at 9:58 am
Viewing 15 posts - 4,036 through 4,050 (of 13,469 total)