Format:
Recent snippets for: kopelli
SELECT TOP {#} {Fields} FROM {table} ORDER BY newid()
200 Views
no comments
DECLARE @str nvarchar(128) SET @str = '[AdventureWorks].[dbo].[ErrorLog]' SELECT ISNULL(PARSENAME(@str, 4), @@SERVERNAME) AS [ServerName], ISNULL(PARSENAME(@str, 3), DB_NAME()) AS [DatabaseName], ISNULL(PARSENAME(@str, 2), ISNULL([default_schema_name], 'dbo')) AS [SchemaName], PARSENAME(@str, 1) AS [ObjectName] FROM [sys].[database_principals] WHERE [name] = SYSTEM_USER
158 Views
no comments
foreach ($adminGroup in gwmi -computer "." Win32_Group | where {$_.SID -eq "S-1-5-32-544"} | select -Property __PATH) {foreach ($userPart in gwmi Win32_GroupUser | where {$_.GroupComponent -eq $adminGroup.__PATH} | select PartComponent) {gwmi Win32_Account | where {$_.__PATH -eq $userPart.PartComponent} | select @{Name="Account";Expression={$_.Caption}}}}
273 Views
no comments
Imports System Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports System.Diagnostics Public Module Tools Public Sub DateTimeStamp() Dim textSelection As EnvDTE.TextSelection textSelection = DTE.ActiveDocument.Selection
236 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
