SQL how I hate thee

jflail2
jflail2 Posts: 2,868
edited April 2008 in The Clubhouse
Been trying to teach myself sql at work the last couple of weeks, and this has been a ridiculously painful process. If anyone knows if any good hints/tips sites it would be greatly appreciated.

If I understood how our internal db's were structured it probably wouldn't be as painful either...
2007 Club Polk Football Pool Champ

2010 Club Polk Fantasy Football Champ

2011 Club Polk Football Pool Champ


"It's like a koala bear crapped a rainbow in my brain!"
Post edited by jflail2 on

Comments

  • tcrossma
    tcrossma Posts: 1,301
    edited April 2008
    One tip I have is to use Microsoft Access to first create a query in Design view and then view the SQL source. It's a good way to experiment and see the resulting SQL for things you couldn't figure out.
    Speakers: Polk LSi15
    Pre: Adcom GFP-750 with HT Bypass
    Amp: Pass Labs X-150
    CD/DVD Player: Classe CDP-10
    Interconnects: MIT Shortgun S3 Pro XLR
    Speaker cables: MIT MH-750 bi-wire
    TT:Micro Seiki DD-35
    Cartridge:Denon DL-160
    Phono Pre:PS Audio GCPH
  • haimoc
    haimoc Posts: 1,031
    edited April 2008
    Try this:
    http://www.w3schools.com/SQL/sql_intro.asp
    http://www.orafaq.com/wiki/Database_Concepts

    I would recommend to get a good book to understand the database concept with Oracle/SQL..
  • Jstas
    Jstas Posts: 14,806
    edited April 2008
    MKZ wrote: »
    Which DBMS you are using?

    Yes, which RDBMS? Because if it's Oracle, the site has a tremendous amount of stuff and the Osborne Press books are excellent tools.

    If it's something like Informix, O'Reilly had a good book for that and they have a handy-dandy little pocket reference for SQL that I really like too.

    O'Reilly had a good book for Ingres too.
    Expert Moron Extraordinaire

    You're just jealous 'cause the voices don't talk to you!
  • Polk addict
    Polk addict Posts: 558
    edited April 2008
    What are you using SQL for??
    Chiranth
    hoosier21 wrote:
    Cobra + SDA's = dead amps laying all around.
  • MKZ
    MKZ Posts: 1,068
    edited April 2008
    What are you using SQL for??

    DML I guess. if not DDL.
  • jflail2
    jflail2 Posts: 2,868
    edited April 2008
    tcrossma wrote: »
    One tip I have is to use Microsoft Access to first create a query in Design view and then view the SQL source. It's a good way to experiment and see the resulting SQL for things you couldn't figure out.

    Actually, I am working in Access, bu I'm using the sql view (creating a sql pass through query.)

    Good question on the DBMS, and I'm not sure to be honest. That would probably help....

    I work for a financial data firm, but I normally do research on real estate companies, so my sql knowledge is non-existent. There's so much data that I need to get to now that I figured I might as well try to learn it to save myself some time and effort...

    Basically, I'm using sql to get to specific points in time for pricing, estimates, etc for different companies. Some of these data points aren't available in our product on a historical daily basis, so sql is the only way for me to get to them.
    2007 Club Polk Football Pool Champ

    2010 Club Polk Fantasy Football Champ

    2011 Club Polk Football Pool Champ


    "It's like a koala bear crapped a rainbow in my brain!"
  • tcrossma
    tcrossma Posts: 1,301
    edited April 2008
    jflail2 wrote: »
    Actually, I am working in Access, bu I'm using the sql view (creating a sql pass through query.)

    Good question on the DBMS, and I'm not sure to be honest. That would probably help....

    I work for a financial data firm, but I normally do research on real estate companies, so my sql knowledge is non-existent. There's so much data that I need to get to now that I figured I might as well try to learn it to save myself some time and effort...

    Basically, I'm using sql to get to specific points in time for pricing, estimates, etc for different companies. Some of these data points aren't available in our product on a historical daily basis, so sql is the only way for me to get to them.

    Even better. My point was that Access's Query Designer is a good tool to learn SQL. Being able to write ad-hoc SQL is great, but there's no harm in using a GUI designer to help you get started or "fill in the blanks" when you can't get the syntax quite right. Take advantage of Access's GUI, it's pretty decent, and it's nice being able to flip back and forth between the SQL view and GUI view to see the code.

    Have fun.
    Speakers: Polk LSi15
    Pre: Adcom GFP-750 with HT Bypass
    Amp: Pass Labs X-150
    CD/DVD Player: Classe CDP-10
    Interconnects: MIT Shortgun S3 Pro XLR
    Speaker cables: MIT MH-750 bi-wire
    TT:Micro Seiki DD-35
    Cartridge:Denon DL-160
    Phono Pre:PS Audio GCPH