Aug
06
2010
To run SQL Scripts from Notepad++
To setup notepad++ to execute sql scripts that you are writing do the following:
1. Be sure that you have the nppexec plugin installed.
2. Hit F6 to open the nppexec execute window.
3. In the Commands window type the following command…
SQLCMD.EXE -E -S.\SqlExpress -i “$(FULL_CURRENT_PATH)” -deScore
4. Click Save and give the nppexec script a name. Make a mental note of the scripts name.
5. Click on Settings/Shortcut Mapper and choose the Plugin commands tab.
6. Scroll through the list and find your new script (given in step 4).
7. Double click the script and assign a keystroke to the script. (I use ctrl-alt-F5)
Test it out.
Enjoy.