SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How do you manage your code snippets/documentation?


How do you manage your code snippets/documentation?

Author
Message
sqldriver
sqldriver
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2274 Visits: 2536
The .sql file that I started using to store interesting bits of code, things I wanted to play with, general interest, etc., is growing rather large and unwieldy. I'm trying to find a solution to break out and manage/document things. My company has a Wiki, but companies aren't forever. I would like it to be sort of private, preferably free, and, you know, internetted.

I guess GitHub is the obvious choice for a lot of people, but I've never used it.

Thanks
Sean Lange
Sean Lange
SSC Guru
SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)

Group: General Forum Members
Points: 64660 Visits: 17979
erikd (7/9/2013)
The .sql file that I started using to store interesting bits of code, things I wanted to play with, general interest, etc., is growing rather large and unwieldy. I'm trying to find a solution to break out and manage/document things. My company has a Wiki, but companies aren't forever. I would like it to be sort of private, preferably free, and, you know, internetted.

I guess GitHub is the obvious choice for a lot of people, but I've never used it.

Thanks



Interesting you should ask...I have used a program called CodeBox for several years. However, I have only the demo version and have outgrown the demo size. Interestingly when I clicked on the website link in the program a few months ago I was taken to a site that is...well...not exactly HR friendly. Needless to say, the company has obviously gone the way of the dodo bird. Just a couple weeks ago I was thinking I need to get back to my own implementation and I am very nearly complete with an asp.net version. This is still the first draft but I have everything finished but the Delete function. I would be happy to send it your way if you would be willing to offer some feedback.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
sqldriver
sqldriver
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2274 Visits: 2536
Hi Sean,

I'd be happy to. Send it along.

Thanks
Sean Lange
Sean Lange
SSC Guru
SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)

Group: General Forum Members
Points: 64660 Visits: 17979
Give me a couple days to get it all cleaned up and I will send it along.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Lowell
Lowell
SSC Guru
SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)

Group: General Forum Members
Points: 74709 Visits: 40985
i'll throw my two cents in;
I use a combination of saved scripts in a specific folder(lazily using C:\Users\<username>\Documents\SQL Server Management Studio\Projects, and that folder has subfolders and hundreds, probably thousands of files.

for shorter snippets, i use the cliptext feature of editplus, which is a syntax highlighting text editor. it has a boatload of nice features,a nd helps me edit all types of text files, and really powerful macro features.

it has a nice feature where i can give something a short description, and double clicking that description pastes the codeblock associated into the current text document.
it supports multiple groups of snippets, so i have them grouped for every version of SQL(ie sql2005/08/2012.

I grab any interesting snippet form the forums here, and save them constantly; i shudder to think how many snippets i have actually saved over the years. I've never tripped over a size limit for the collection, but have found it sometimes replaced the carat symbol^ that exists in my snippets from version2 to version3 during an upgrade




Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Attachments
editplus.png (144 views, 129.00 KB)
sqldriver
sqldriver
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2274 Visits: 2536
Thanks, Lowell. Is your library at all portable? I find myself working from several computers, and several more term servers, so it's helpful for me to be able to access my bits and pieces from multiple places. Right now it's a shortcut to a file on DB. Which is part of why things are turning unwieldy.
Sean Lange
Sean Lange
SSC Guru
SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)

Group: General Forum Members
Points: 64660 Visits: 17979
Here is a screen shot of what I have been working on.



_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Attachments
Untitled.png (121 views, 37.00 KB)
Lowell
Lowell
SSC Guru
SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)SSC Guru (74K reputation)

Group: General Forum Members
Points: 74709 Visits: 40985
erikd (7/10/2013)
Thanks, Lowell. Is your library at all portable? I find myself working from several computers, and several more term servers, so it's helpful for me to be able to access my bits and pieces from multiple places. Right now it's a shortcut to a file on DB. Which is part of why things are turning unwieldy.


EditPlus2 is portable, and just comes up with a nag screen on startup about registering(you are on Day 439 of 30 day trial period). That's what i keep on my PortableApps drive.

EditPlus3 quits after a defined testing period, and so it's not portable...but the files (ie SQL2012.ctl) are the exact same format, so a quick robocopy when i need to capture new snippits works fine.

I can throw you my PortableApps folder for it if you think it's worthwhile.

Also, for portable apps, Linqpad is my goTo for a SSMS replacement when it's not installed and I'm doing consulting, or otherwise don't have access to SSMS:



Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
sqldriver
sqldriver
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2274 Visits: 2536
Sean, that looks awesome.

Lowell, if you mean the folder full of all your wisely written code that a scrub could learn from, then yes. Otherwise, I can probably set something similar up when I get a chance to mess with it.
Steve Jones
Steve Jones
SSC Guru
SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)

Group: Administrators
Points: 150344 Visits: 19453
Didn't know EditPlus did that, though I use that for lots of stuff.

I have started using GitHub for keeping code sync'd between machines. Like that for now.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search