Learning SQL

Post » Sat Jan 10, 2015 10:05 am

This week at work I was introduced to SQL, how to build and run inquires. Quite a powerful tool, but one apt to error if you make a small mistake. I'm sure some of you have gone through this and thought it might be amusing to those who have. While I was working with it to find the manufacturing lineups I needed to change, on my own for the first time after a single one hour lesson, it went something like this:

Crap, that didn't work

Crap, that didn't work

Not that either

AHHHHH 3000 lineups to fix!
...wait that can't be right

Crap, that didn't work

Nope, not that either

Zero lineups??? That can't be right!

Crap, that didn't work

636 lineups!! AHHHH that sounds somewhat legitimate and like a lot of work!
ohhhh....wait, I forgot to filter for something

10 lineups! That's better!

While I don't have to use it, it will definitely make my job more efficient and I'm excited to learn more. Anyone have similar experiences?
User avatar
Lalla Vu
 
Posts: 3411
Joined: Wed Jul 19, 2006 9:40 am

Post » Sat Jan 10, 2015 7:35 am

I didn't, but I learned SQL about 20 years ago. :P

When I was first learning about database queries I was working a data entry job for extra money...filling out forms in a Microsoft Access database. I discovered that I could speed things up by writing my own insert and update queries using the GUI query design tool. Said GUI tool could also show you the SQL that was being generated, so I started putting 2 and 2 together and began to learn SQL that way.

These days I do things that are orders of magnitude more complex than a GUI tool can generate. Over the years I've become a bit of a SQL ninja. If you have any questions feel free to ask.

User avatar
Chrissie Pillinger
 
Posts: 3464
Joined: Fri Jun 16, 2006 3:26 am

Post » Sat Jan 10, 2015 2:39 pm

I used to be pretty good with SQL, alas i've forgotten most of it. Still, had to use in work couple of weeks ago and still remembered how an "INNER JOIN" query works :hehe:

Though i didn't have enough time to figure out why parameters and inserting empty columns into the result set didn't work in the VB.Net program i was modifying, and had to resort to ugly, brute force "SELECT * FROM [table]" stuff and manipulate the result set afterwards in a way that could have been done with just the SQL phrase :blush:

Oh well, it was never meant to be a permanent addition, and it worked :hehe:
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am

Post » Sat Jan 10, 2015 12:03 pm

Is it possible to directly interface between Python and SQL? I'm using Python to build a Virtual Classroom for my school with CGI. For the moment I've had to use text files for a database. Probably fast enough to deal with 300 students, but sloppy.

User avatar
bonita mathews
 
Posts: 3405
Joined: Sun Aug 06, 2006 5:04 am


Return to Othor Games