|
What, can't you just ask the computer "give me this data" and it writes the SQL query for you?
"Hello, computer."
"Use the keyboard? How archaic!"
I hope y'all know what movie I'm quoting.
|
|
|
|
|
Marc Clifton wrote: can't you just ask the computer "give me this data" and it writes the SQL query for you?
I know. It's quite annoying that I can't. Even Google Home (assistant) won't just tell me answers a lot of the time.
Marc Clifton wrote: I hope y'all know what movie I'm quoting.
I tried DuckDuckGo and got nothing for those quotes.
Maybe, War Games with Matthew Broderick?
Or maybe Star Trek..."Computer...what is our heading?"
|
|
|
|
|
evernote or onenote since they allow for naming sub tabs, I can categorize them, make it a little faster to search
|
|
|
|
|
Matt McGuire wrote: evernote or onenote since they allow for naming sub tabs, I can categorize them, make it a little faster to search
That's an interesting one. I think whatever organization system a dev finds that works for him/her is good. And most people in this thread have said this is basically what they do or just put them all in a text file.
These methods just feel like only one step above keeping them in a plastic binder.
I wish there was a way to really categorize, organize, digitize and systematize the whole situation. But, I'm lazy and slow and I forget SQL all the time (because it is so forgetable).
|
|
|
|
|
Since I'm not the DBA here, I tend to forget how to do simple things like create a table with a index, or how to use cross apply with a function on a table. I only touch these things once in awhile, I needed a way to organize my notes to remember how they work.
It seems once I'm writing SQL it all comes back pretty quick, but when I've been working in code for a few months, all that SQL gets archived in the deep back of my brain, next to the cobwebs and cassette tapes
|
|
|
|
|
Great post!
Your post is exactly what I go through constantly. I may not really need to design and write a new query for 1 or more years. Then I go back and have to invent the wheel all over again.
|
|
|
|
|
I use a private GitHub repo, and use Agent Ransack on my local laptop to find specific files by key words or phrases.
|
|
|
|
|
MSBassSinger wrote: I use a private GitHub repo, and use Agent Ransack on my local laptop to find specific files by key words or phrases.
That's a good combination. Easy to get to from anywhere on the Internet and also you can search them. I'm going to have to look into this agent ransack thing, but the word "ransack" has really put me off it. Many here have mentioned agent ransack.
|
|
|
|
|
Create views with meaningful names?
Isn't that what views are for?
|
|
|
|
|
That's a good thing. I'm more talking about a way to get to old SQL queries / Stored Procs (SP) I've written in past to solve problems which I can use again to solve new problems --- after slightly altering them.
I'm talking about query design and SP creation and managing these old queries I have worked through to get to the answer. I often create some cool query and then 3 years from now I totally forget how i did it.
|
|
|
|
|
Oh, for that I create sql files and store them on servers with multiple backup avenues.
Then I forget where they are and run to the internet to look up ways to solve the problems I can't remember the solutions to.
|
|
|
|
|
Member 8234139 wrote: Oh, for that I create sql files and store them on servers with multiple backup avenues.
Then I forget where they are and run to the internet to look up ways to solve the problems I can't remember the solutions to.
That's exactly my method.
|
|
|
|
|
I wrote a little program called Code Vault it lets me name the snippet of code with a date saved and the code It is searchable from experience it needs a one character field where you enter C for create or U for Update need to rewrite it as it is in VB 6 Just a suggestion
|
|
|
|
|
Yeah a SQL-Vault is the type of thing I'm talking about. It would be nice.
|
|
|
|
|
Sorry for the late reply been working at the hospital a lot
You can find my GitHub here look for PW Keeper
https:
Enter this link in the ADDRESS FIELD not the SEARCH FIELD
|
|
|
|
|
Why use text files? A database can store strings. So if you want searchable storage of queries why not make a table?
|
|
|
|
|
Yes, I'll query the database for the query that I need so I can query the database.
You are correct though. I'm thinking more of a SQL-Manager that allows me to file away SQL queries with a good summary of what it does and keywords for finding.
|
|
|
|
|
So you mean a separate database of queries that hold the queries that you can query so you can query the other database? Maybe OneNote is what you want.
|
|
|
|
|
So, it depends on which interface you're using.
If you're using Management Studio you can save frequently-used queries in 2 places (I've used both over the years):
1) Create a 'Project' (File / New / Project / SQL Server Scripts) and save .SQL files into that project. Kinda clunky for organization, but workable. I used this method as a default, and used file naming for file sorting and commented keywords for searches. Sometimes you have to open the project file and manually rearrange the file references.
2) use the Code Snippets Manager (Tools / Code Snippet Manager) You can create your own Groups and add scripts to existing or new Groups. pretty handy, a little clunky, but it works. I used this area for some very-frequently-used utility scripts.
If this info is coming to you late, well - I read your thread early this morning, but didn't get to my computer till now. Take it for what its worth.
Cheers,
Time is the differentiation of eternity devised by man to measure the passage of human events.
- Manly P. Hall
Mark
Just another cog in the wheel
|
|
|
|
|
Oh, by the way: if you use Option 1 (SQL files and SQL Project) you can use version control so as to not lose files or their contents.
Time is the differentiation of eternity devised by man to measure the passage of human events.
- Manly P. Hall
Mark
Just another cog in the wheel
|
|
|
|
|
This is good stuff. I will read over this again and try it out. Thanks very much for reading and posting.
|
|
|
|
|
Sure. No prob. If you have any questions, please send them.
Time is the differentiation of eternity devised by man to measure the passage of human events.
- Manly P. Hall
Mark
Just another cog in the wheel
|
|
|
|
|
Apple maps has competition![^]
I can see so many reasons why it never caught on ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That's the most amazing technology and amazing thing that some GENIUS put their mind to solving.
Also, it is the utterly the stupidest thing someone has ever even thought about doing.
This is the idiot-genius at work!!! We need more products from this type of individual.
|
|
|
|
|
Actually, with enough infrastructure in place it could work.
It's accurate over around twenty miles, so you'd need hubs every 20 miles. Each hub contains cassettes with direction to every location within the twenty mile range, including all the neighbouring hubs.
You drive to a hub, get the next hub cassette, drive there, hand it over and get the next, and so on until you reach your target hub and collect the "local destination" cassette.
With enough tapes and trucks to return them to the appropriate hubs, it'd work. Total Genius!
But it's spectacularly inefficient, and a bloody stupid idea!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|