|
DECLARE @TableName AS VARCHAR(4000)
SET @TableName = <table_name,,'EmployeeTable'>
SELECT COLUMN_NAME
, DATA_TYPE
, IS_NULLABLE
, CHARACTER_MAXIMUM_LENGTH
, COLUMN_DEFAULT
, [value] AS [MS_Description]
FROM INFORMATION_SCHEMA.COLUMNS is_c,
::fn_listextendedproperty
(NULL, 'user', 'dbo', 'table', @TableName, 'column', default) p
WHERE TABLE_NAME = @TableName
AND objname COLLATE Latin1_General_CI_AI = COLUMN_NAME COLLATE Latin1_General_CI_AI
AND name = 'MS_Description'
ORDER BY ORDINAL_POSITION ASC;
Fetches some basic metadata for a table in Sql Server 2000+
I are Troll
|
|
|
|
|
SELECT *
FROM sysobjects
WHERE xtype='U'
AND name NOT IN
(
SELECT object_name(parent_obj)
FROM sysobjects
WHERE xtype = 'PK'
)
Sql 2000+
I are Troll
|
|
|
|
|
SELECT *
FROM sysobjects
WHERE xtype='U'
AND name NOT IN
(
SELECT object_name(id)
FROM sysindexes
WHERE indid = 1
)
ORDER BY 1
I are Troll
|
|
|
|
|
Ooohhh... now bring in Extended Properties.
(I experimented with that a while back.)
|
|
|
|
|
Public Sub SearchGoogle()
DTE.ItemOperations.Navigate( _
"http://www.google.com/search?q=" & GetSelectedWord())
End Sub
Public Sub SearchMsdn()
DTE.ItemOperations.Navigate( _
"http://www.google.com/search?btnI=I%27m+Feeling+Lucky&hl-en&q=site%3Amsdn.microsoft.com+" & _
GetSelectedWord())
End Sub
Private Function GetSelectedWord() As String
Dim selection As TextSelection = DTE.ActiveDocument.Selection()
If selection.Text <> "" Then
Return selection.Text
Else
DTE.ExecuteCommand("Edit.SelectCurrentWord")
selection = DTE.ActiveDocument.Selection()
Return selection.Text
End If
End Function
SearchGoogle does as implied, SearchMsdn is using the "Feeling Lucky" feature to jump to (hopefully) MSDN.
To assign their hotkey's;
- Go to the menu Tools / Options
- Select "Environment, Keyboard" from the categories
- In the box labeled "Show commands containing", type "Googl"
- Select the Macro from the list
- Click the box labeled "Press shortcut keys", and press
F1
- Click the "Assign" button (!)
- Assign'd
Shift-F1 to MSDN.
I are Troll
|
|
|
|
|
Public Sub AsQuotedString()
Try
DTE.UndoContext.Open("Macro: AsQuotedString")
Dim txtSel As TextSelection = CType(DTE.ActiveDocument.Selection, TextSelection)
txtSel.Untabify()
Dim searchPattern As String = "^.#$"
Dim replacePattern As String = " ""\(-70,0)"" + _"
txtSel.ReplacePattern(searchPattern, replacePattern, vsFindOptions.vsFindOptionsRegularExpression)
Finally
DTE.UndoContext.Close()
End Try
End Sub
Converts this;
SELECT id
, status
, max_size
FROM sys.traces
ORDER BY [id]
To this;
" SELECT id " + _
" , status " + _
" , max_size " + _
" FROM sys.traces " + _
"ORDER BY [id] " + _
Now use Shift-Alt while selecting the queryblock inside the quotes. That's the easiest way to copy the query without the quotes back into the Managment Studio.
The regex is also usefull for generating fixed size columns
|
|
|
|
|
modified on Wednesday, May 27, 2009 3:50 PM
|
|
|
|
|
Just stopped by to say a hi and to congratulate you on winning the MVP award.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
amberindicator (1.0.0) stable; urgency=high
* Non-maintainer upload.
-- Eddy Vluggen <amberindicator@eddyvluggen.info> Tue, 21 Aug 2012 00:00:00 -0000
|
|
|
|
|
amberindicator (1.0.0) stable; urgency=high
* First version.
-- Eddy Vluggen <amberindicator@eddyvluggen.info> Tue, 21 Aug 2012 00:00:00 -0000
|
|
|
|
|
amberindicator
Copyright 2012 Eddy Vluggen <webmaster@eddyvluggen.info>
2012-08-21
The home page of amberindicator is at:
http://www.compu-link.net/index.php?id=amber-client-for-linux
The entire code base may be distributed under the terms of the CodeProject
Open License (CPOL), which can be viewed at;
http://www.codeproject.com/info/cpol10.aspx
|
|
|
|
|
.TH amberindicator 1 "August 20, 2012" "version 1.0" "USER COMMANDS"
.SH NAME
amberindicator \- to start the indicator
.SH SYNOPSIS
.B Launches a tray-icon
.SH DESCRIPTION
Launches a status-indicator to monitor the AMBER-alert service.
.PP
Requires internet-access.
.SH EXAMPLES
.TP
Launch the indicator:
.B mono amberindicator.exe
.PP
.SH EXIT STATUS
not set
.SH AUTHOR
Eddy Vluggen (amberindicator@eddyvluggen.info)
|
|
|
|