One Slipped Key

Death By ChocolateWhile working I wrote a little bit of SQL, trash really because it was just a one-shot query, real short too, and I wanted to show off the SQL code for making the iModules degree info pretty. Instead of clicking open, I clicked the save button. I found the file I thought I was opening and double-clicked. The computer asked me “Are you sure you want me to save using this file, overwriting the old file?” and I absent-mindedly clicked Yes.

The little useless fragment of SQL code replaced my huge SQL script. Boom. All gone. So sorry.

So then I was thinking about how I could recover the file, that it was on my laptop at home and so if I could turn off the Wifi at home and start my laptop I could copy the file before the Dropbox sync app replaced what I needed with my mistake.

But then I thought there should be something in Dropbox that helps address my stupidity. Turns out there is. Right click on your oops file, click on “View Previous Versions” and it opens a website and shows you all the previous times you saved your file on the service. Oh look, there’s all my hard work, right there. Click. Whew!

So, how much do I love Dropbox? Even more.

 

photo by: JD Hancock

Hindsight – 2/5/2004

As I was looking over my old LiveJournal posts I found this gem from 2/5/2004, a whole 7 years ago! Gosh how time flies! Enjoy!

Busy Busy Busy… Buzz Buzz Buzz

Whew! Just got done polishing the new chrome on the new database system here at work. We had a rep from the vendor come in to deliver the first cut of the converted database and then walk us through all the errors that came up in conversion so we can take specific steps to make sure our database that goes into the second (and final) cut is as good as it’ll ever be.

Of course, the road to happiness is riddled with potholes. The rep, Yvonne, arrived, installed the new database but nobody told us that the new database was ZIP’ed using WinZip 9 beta and all we had was WinZip 8.1, so we couldn’t unzip the database. Adding insult to injury, the server we were working on was so well secured that getting WinZip 9 beta proved to be herculean in its own regard. We eventually got it, unpacked the database and installed it. >mini-fanfare< Then we fiddled around with establishing OLAP cubes for a subsystem that might only be used by at most 2 people – then once that was done we went back to Walwood and I worked on getting our replicated database on our report server to work.

The rep from our vendor came in and created a queue for us and told us that it would work. I then spent the next two days listening to all the errors present in the data and in-between times when we weren’t talking about the conversion errors I was working on getting the replicated report server to work as it should. For three days I was smacking my forehead against a brick wall, errors ranging from “can’t login” to “can’t add NULL value to table yada yada yada” and I even went so far to discover to my chagrin that a database I thought I needed wouldn’t replicate in a merge dynamic properly, only transactionally. This semi-solution would break down when you deleted or added any report criteria, since it would add a table to the primary server and then cause the replication process to panic. As it turns out, one of the settings the rep from the vendor made was wholly incorrect, instead of pointing to our report server it should have been pointing to our main database server instead. Once I fixed the setting I realized that I didn’t need to replicate the report database at all and once I fixed that – everything fell into its proper position – now you can add and edit and delete criteria willy-nilly without causing replication errors because there is no need to replicate that part of the database. Whew. After three days of being unable to make any of the replicated server work I had a little Eureka moment and did a happy dance.

What I thought would take nearly all day today was done by 9:30am. I still have a very busy day but at least now with a major part of it deflated it doesn’t seem like such an impossible task. A part of me gets all twitchy that I, an untrained yo-yo can figure out the vendors product and fix what the rep broke. A part of me is glimmering tho, when the rep was here she asked me “So, did you go to class for SQL 2000?”, “No.”, “Do you at least have a manual or a guidebook?”, “No.”, “Well, how did you figure out how to do what you are doing?”, “I just did it, didn’t seem too hard to me…” and of course she just sat there staring at me like I was growing antlers.

And people wonder why I question the value of certifications. Bah. 😉

 

Bloody Hell

What started out as a very innocent SQL-related question quickly expanded into an abominable Frankensteins Monster.

One of my coworkers asked if there was a way to create a SQL View in SQL 2000 so that when queried it would spit out a constituent’s ID and then list, in comma-delimited fashion the years they won a degree from WMU’s Haworth College of Business, in earlier-then-later year order. So she wanted:

0000045321  1968, 1974, 1978

Here is how I did it. I created a Frankensteins Monster. It’s two views and a function. I have unleashed this abomination upon the face of the Earth and I feel a lot like Dr. Frankenstein, maniacally dry-washing my hands and laughing “Muhahahahaha!” a lot. It doesn’t take much to get that out of me. 🙂 The code is beyond the More… tag, if you care to expose yourself to the abomination… Continue reading