How long did it take you to "get" it? (programming in SQL)

N2ITN2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
I've been at it for about 14 months and I feel I am starting to really get it. Windowing, Pivot, etc some of the more difficult concepts. But the main growth is being able to apply it to a reports or business solution.

I can see why people never take it very far it seems I had to go at it fairly hard for about 6 months to really get solid at query writing.

For me it came like this

Selects then shortly after joins. Sub queries took a little longer then moved into some programming techniques like cast and casting. Then eventually picked up pivot and windowing. During this time I learned how to write SP and how to associated them with a job to automate the SP.

I am still a infant when it comes to experienced pros. Just tricks like using isnumber instead of ticking all your searched items in the where clause. And a big big deal is noting your code and writing it clean. Instead of hitting a table 14 times (guilty as charged) I began using the Pivot feature. Literally 10 times faster.

I personally feel another year or 2 and I'll be a programmer / analyst rather than just a analyst. This is my end goal if the job direction allows me. I love driving software projects and managing resources, but I never want to be so far away from the technology that I am ineffective from a technology standpoint.

One side item, since I have gotten a lot stronger with SQL I haven't had to write as much VBA in Excel for reports. This has been a huge plus. And Thank God for CTE's temp tables don't work in MS Query.

Any one with experience can relate? How did your path go if you don't mind sharing.

Comments

  • RobertKaucherRobertKaucher Member Posts: 4,299 ■■■■■■■■■■
    I think that it took me about a year as well. It was really going through the stuff in Joe Celko's books and the challenges from Itzik Ben-Gan. I generally tell people that it's going to take a year before you really get a handle on SQL. It seems really simple at first but that's because you aren't looking at any of the really hard, real-world problems that people need to solve. Once you have really learned something that takes a while to get your head around I think you get better at being a learner in general.
  • Node ManNode Man Member Posts: 668 ■■■□□□□□□□
    I learned SQL by running a phpnuke forum. Immediately after setting it up I started reverse engineering it and making my own modules. I would call it a crash course but I was at it years and had a lot of fun doing it.
  • N2ITN2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
    I think that it took me about a year as well. It was really going through the stuff in Joe Celko's books and the challenges from Itzik Ben-Gan. I generally tell people that it's going to take a year before you really get a handle on SQL. It seems really simple at first but that's because you aren't looking at any of the really hard, real-world problems that people need to solve. Once you have really learned something that takes a while to get your head around I think you get better at being a learner in general.

    Yeah maybe that's true Robert

    The first piece is to slow down and make sure to gather to right requirements. Then follow up to make sure you have the right requirements lol.

    Once I get that piece down I start to build my code so it fits together. I find myself still over thinking things lol.
  • NotHackingYouNotHackingYou Member Posts: 1,460 ■■■■■■■■□□
    It took me about 6 months to a year of writing SQL every day to really feel like I had a good grip on it.
    When you go the extra mile, there's no traffic.
  • ayubjonayubjon Member Posts: 33 ■■□□□□□□□□
    I think that it took me about a year as well. It was really going through the stuff in Joe Celko's books and the challenges from Itzik Ben-Gan. I generally tell people that it's going to take a year before you really get a handle on SQL. It seems really simple at first but that's because you aren't looking at any of the really hard, real-world problems that people need to solve. Once you have really learned something that takes a while to get your head around I think you get better at being a learner in general.

    I think I am in that situation where I think SQL is really easy. But you saying it isn't that easy. Can you please give one good example of a problem that experienced DBAs usually need to solve?
  • zidianzidian Member Posts: 132
    ayubjon wrote: »
    I think I am in that situation where I think SQL is really easy. But you saying it isn't that easy. Can you please give one good example of a problem that experienced DBAs usually need to solve?

    Efficient Partitioning and Index schemes on a database that is several terabytes in size. This goes into a number of other things, including sql clusters and data file management. You also have to work in secure backups that typically need to trickle down to lower level environments as necessary for application testing and development.
    WGU BS-IT Software | Completed 9/30/2014
  • N2ITN2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
    I know 20 year vets who don't call SQL easy. They are writing spatial queries now building out shape files etc. It wasn't easy IMO. Just building the structure and then figuring out how to optimize the tables etc took a while and tons of iterations.
  • N2ITN2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
    Year 2.5 finally getting better and better. I think it takes 5 years to get really good at it and 10 to become a stud.
  • nachodbanachodba Member Posts: 201 ■■■□□□□□□□
    I've been on the admin side (Server buildouts, Clustering, System management, etc) of SQL Server for about two years. One of my goals for 2015 is to become more proficient with writing SQL, as it will help me when it comes down to troubleshooting non-server related issues, such as indexes, inefficient queries, etc.
    2020 Goals
    work-life balance
  • N2ITN2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
    At Nacho I started piecing together system queries. It get's a little tricky when you start joining on major and minor id's. I believe this is related to the way the sets are set up in the tables. You have tables linked to the major I believe and the columns linked to the minor ids. I actually was able to write out a query that shows database, schema, tables, columns, keys, indexes, constraints, defaults, null or not null, ordinal value (which is great because you can row_number over partition order by and wrangle data into the rows), table descriptions and columns descriptions. It's pretty cool it basically lays out a data dictionary. I also was able to ID which percentage of tables didn't have primary keys which was a big help for removing tables for clean up. (Of course renaming them first then removing).

    Glad to see a another DBA on this forum. I'm more of a techno functional in my role, but I build a lot of objects and report using VBA and SQL.

    Welcome!
  • nachodbanachodba Member Posts: 201 ■■■□□□□□□□
    Hey N2IT, were there any books you would recommend. I'm currently making my way through Itzik Ben-Gan's 70-461 study guide.
    2020 Goals
    work-life balance
  • N2ITN2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
    I still use that one to this day. It's either that or Google to be honest. I did pick up the T SQL Foundations by the same author but 461 covers most of that material.
  • daviddwsdaviddws Member Posts: 303 ■■■□□□□□□□
    Im also getting ready to study sql. I had some classes in grad school, but would like to get the OCA.
    ________________________________________
    M.I.S.M:
    Master of Information Systems Management
    M.B.A: Master of Business Administration
  • N2ITN2IT Inactive Imported Users Posts: 7,483 ■■■■■■■■■■
    @ David I had several courses as well, was on the SQL BI track at the community college for a while. It helped a lot but getting hammered in the real world is unbelievable. Getting crushed over and over again is the best teacher for me.
Sign In or Register to comment.