Aqua Data Studio - CTRL+B Beautifies Query

In a query pane in Aqua Data Studio… turn a query that looks like this:

into a beauty, like this:

All by pressing CTRL+B.

For the text equivalent:


select m.city, m.st, count(*)
from ___________ m
inner join ____________ z
on m.city = z.city and
m.st = z.state and
m.zip = z.zip_code WHERE
m.zip > '' AND
m.st > '' AND
m.city > '' AND
z.city is null AND
z.state is null and
z.ZIP_CODE is null
group by m.city, m.st, m.zip
HAVING count(*) <= 1 ;

into:


SELECT
	M.CITY,
	M.ST,
	COUNT(*)
FROM
	__________ M
		INNER JOIN __________ Z
		ON M.CITY = Z.CITY AND
		M.ST = Z.STATE AND
		M.ZIP = Z.ZIP_CODE
WHERE
	M.ZIP > '' AND
	M.ST > '' AND
	M.CITY > '' AND
	Z.CITY IS NULL AND
	Z.STATE IS NULL AND
	Z.ZIP_CODE IS NULL
GROUP BY
	M.CITY,
	M.ST,
	M.ZIP
HAVING
	COUNT(*) <= 1

Add comment April 10, 2008

Enterprise Manager / SSMS - Convert selection to Uppercase/Lowercase

I don’t know why I have this habit, but typically I write most of my queries in lowercase. All lowercase. Once I’m ready to publish them or have them reviewed, I’ll convert everything applicable (some parameters don’t need to be made uppercase) to uppercase.

CTRL+SHIFT+U converts your text selection to uppercase. CTRL+SHIFT+L converts your text selection to lowercase.

Add comment January 20, 2008

CTRL+NumPadPlus Automatically Expands Windows Explorer to the Longest Column

[Via] From Windows Explorer, in Details View, to auto-expand to the longest column just press CTRL+NumPadPlus.

This one is my new favorite.

Add comment January 20, 2008

Windows+R - Access your MMC via Run

Just enter one of the files (filename.msc) into the Run Program Dialog. Performance Monitor doesn’t require a .msc extension. The one I use the most is services.msc.

  • Certificates - certmgr.msc
  • Indexing Service - ciadv.msc
  • Computer Management - compmgmt.msc
  • Device Manager - devmgmt.msc
  • Disk Defragmenter - dfrg.msc
  • Disk Management - diskmgmt.msc
  • Event Viewer - eventvwr.msc
  • Shared Folders - fsmgmt.msc
  • Group Policy - gpedit.msc
  • Local Users and Groups - lusrmgr.msc
  • Removable Storage - ntmsmgr.msc
  • Removable Storage Operator Requests - ntmsoprq.msc
  • Performance - perfmon.msc
  • Resultant Set of Policy - rsop.msc
  • Local Security Settings - secpol.msc
  • Services - services.msc
  • Windows Management Infrastructure (WMI) - wmimgmt.msc
  • Component Services - comexp.msc

1 comment January 17, 2008

SQL Server - F5 Executes Query

After you’ve parsed your query, in SQL Server, just press F5 and the query will be executed.

Add comment January 13, 2008

SQL Server - CTRL+F5 Parses Query

Instead of going up to the check mark to parse your query for syntactic goodness, just press CTRL+F5.

1 comment January 10, 2008

IBM Thinkpad - Shift+ScrollLock Unlocks Function Key

This one is a little niche, but it’s saved me loads of time.

At work I use an IBM Thinkpad (T42p, to be specific) - and when I undock to go home, sometimes my funciton key is locked.

To unlock, press Shift+ScrollLock

1 comment January 9, 2008

Remote Desktop - CTRL+ALT+END emulates CTRL+ALT+DEL

When you’re using Remote Desktop to administer another computer, you may occaisionally need to view running processes. First, you try CTRL+ALT+DEL. This brings up your local machine’s CTRL+ALT+DEL screen, but in order to bring up the remote computer’s CTRL+ALT+DEL screen you must press CTRL+ALT+END.

Add comment January 8, 2008

Remote Desktop - Alt Tab Equivalent with MMC

This one has been bugging me for a while.

If you’re using Remote Desktop from an MMC snap in your Alt-Tabs aren’t effective on the machine you’re remotely accessing.

rds.png

Just use Alt+PageUp to scroll through your open programs from left to right and Alt+PageDown to scroll through your open programs from right to left.

1 comment January 7, 2008

New Material

I’ll be posting some more keyboard shortcuts once again. Recently, my job changed which has me using products like Outlook 2007, Microsoft Management Console (MMC) and SQL Server 2000/2005 on a daily basis. Learning new shortcuts for those applications has been essential, so watch this site for updates or subscribe.

Add comment January 7, 2008

Previous Posts


Categories

Links

Feeds