Viewing 15 posts - 6,511 through 6,525 (of 13,469 total)
okbangas (10/21/2011)
You'll have to have some kind of table controlling user info and access. Then you would typically use suser_name() in your query to retrieve the...
October 21, 2011 at 8:01 am
okbangas (10/21/2011)
At least you've got user_name(), suser_name(), @@servername and @@servicename.
In addition to what my friend here psoted, I usually start with this inside an auditing trigger, and add additional columns,...
October 21, 2011 at 7:55 am
steveb. (10/21/2011)
Though i have to say writing this kind of function into your server could cause issues, ...
October 21, 2011 at 4:57 am
i believe the issue is this;
FOR XML PATH('tr'), TYPE)
in that case, TYPE escapes out all the brackets (less than,greaterthan, quotes, etc) that would have been HTML.
FOR XML PATH('tr'))
will leave...
October 20, 2011 at 7:03 pm
you can use the .NET Frameworks SQLBulkCopy object , and use that to load via bulk copy, but not BULK INSERT command; that requires you to have already organized the...
October 20, 2011 at 10:40 am
in C#.Ner or VB.Net, it's built into the Striigs Class
Dim MyArray() As String = AnyStringObject.Split(",")
October 20, 2011 at 10:10 am
the coalesce statement is what you are after; it accepts a param array of values(meaning no limit on the number of values to test), and returns the first non-null value
SELECT...
October 19, 2011 at 8:29 pm
I'd say its a permissions issue, since the bat file works from a command window.
this is a common security misconception/"gotcha". The problem is that when you access any resource OUTSIDE...
October 19, 2011 at 5:53 am
you'll have to change the path in two palces;
mine was
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\TraceFileName'
on my machine, running SQLR2, i think you had a different one; change it and...
October 19, 2011 at 5:35 am
--declare variables for parameterizing the command
declare @traceidout int
declare @options ...
October 19, 2011 at 3:19 am
Roust_m (10/18/2011)
No, I can't do it manually all the time, I need this to be run via an sql job on a regular basis. It looks like Powershell is...
October 18, 2011 at 5:13 pm
here's anotehr version i just got working as a function;
it's using a Tally table to swap char by char, based on the ascii() code of the character in question: i...
October 18, 2011 at 2:56 pm
what if more than one bit is true?
SELECT id,'NAME' As Results from YourTable where name=1
UNION
SELECT id,'ADDRESS' As Results from YourTable where address=1
UNION
SELECT id, 'EMAIL' As Results...
October 18, 2011 at 12:11 pm
i ran mine on SQL 2005/2008; the views may report different results between versions, i guess.
how about ....WHERE name like '_WA_Sys_%'
October 18, 2011 at 10:03 am
OK updated yet again...same old links but new code.
October 18, 2011 at 10:01 am
Viewing 15 posts - 6,511 through 6,525 (of 13,469 total)