SQL Coding

Questions on how we spend our money and our time - consumer goods and services, home and vehicle, leisure and recreational activities
Post Reply
Mandrale
Posts: 164
Joined: Mon Jun 11, 2012 2:55 pm

SQL Coding

Post by Mandrale » Thu Feb 28, 2013 4:37 pm

Does anyone have experience of learning SQL coding on their own? What are some good ways to go about educating myself on learning the language? Any good book recommendations?

Is there anyone working in a profession where they are dealing with creating SQL on the daily basis? Any helpful tips to help someone who is looking into learning this for themselves?

I'm attempting to learn this now due to possible career advancement.. I am in a full time position and have graduated school so I have extra time to be learning and further educating myself.

Thanks!

MathWizard
Posts: 3092
Joined: Tue Jul 26, 2011 1:35 pm

Re: SQL Coding

Post by MathWizard » Thu Feb 28, 2013 5:01 pm

No, I haven't learned SQL, but I have learned many Computer related languages/tools (and made some) over my career.
This is what I'd do if I needed to learn it:

Play with SQL and learn something about SQL using the website
http://www.w3schools.com/sql/sql_tryit.asp

When I want to try something new and involved in programming, I turn to O'rielly books.
orielly sql
brings up several books.

Are you looking at Oracle databases (expensive enterprise quality), mysql ( free, open-source, used in Linux) or
something else?

If you're not sure, I'd configure a Linux machine on a PC. If you don't have a spare PC, then either dual-boot,
create a virtual machine, or create a bootable CentOS image on a large thumb drive, preferably 32 GB or bigger.
Then install mysql for free and try writing programs for that.

leonard
Posts: 5993
Joined: Wed Feb 21, 2007 11:56 am

Re: SQL Coding

Post by leonard » Thu Feb 28, 2013 5:03 pm

I think it really depends on whether you use data query tools at work on a sql database. IMO - the best way to learn transact SQL is on data you are already familiar with. A couple suggestions:

1. get a t-sql book and step through it. Again, ideally on data you already use and work with.
2. If you have trouble with understanding how to do something in SQL - use MS Access to build the query and then use the "View SQL" button to see the query in transact SQL. This can help you get past syntax issues for queries that you understand the logic but don't quite have the right syntax.
3. Oh, try to get "read only" access to data you already have access via other tools.
4. If you do work on production servers on which there are stored procedures - you can look at those stored procedures to understand how queries are constructed and run.

Also, you can seek out internal training at your company - if there is any. If there isn't, you might try to get familiar with the IT contacts that do what you are interested in doing and asking questions.
Leonard | | Market Timing: Do you seriously think you can predict the future? What else do the voices tell you? | | If employees weren't taking jobs with bad 401k's, bad 401k's wouldn't exist.

User avatar
rob
Posts: 2991
Joined: Mon Feb 19, 2007 6:49 pm
Location: Here

Re: SQL Coding

Post by rob » Thu Feb 28, 2013 5:45 pm

I would recommend this :-

* Learn some set theory - yeah it sux but it's where most programmers fail IMO - they fail to think in sets and use row at a time stuff.
* Grab a copy of MySQL (Free and easy enough to setup and has a decent implementation of SQL).
* Pick a project that interest you... Say building a DB of your Music (Albums -< Tracks e.t.c. e.t.c.).
* Set a simple data model for it.... Albums in one table with info only about albums, another for tracks e.t.c. [I'm sure google would find able examples]
* Create some data & then try some selects... joining rows from multi tables e.t.c.
* Then move to unions & outer joins e.t.c. but make sure you understand the set theory of what each is doing since you need a higher view of what they accomplish.
* Go back and junk your prev attempt at your project but this time fix the mistakes that are now obvious to you :-)
* Depends where you want to go but lots of stuff around indexes and other things outside of sql to select.

* If you want something more challenging things google the class student database stuff that is often used and then step up to the parts & material examples.
| Rob | Its a dangerous business going out your front door. - J.R.R.Tolkien

HurdyGurdy
Posts: 1172
Joined: Wed May 09, 2012 10:21 pm

Re: SQL Coding

Post by HurdyGurdy » Thu Feb 28, 2013 5:50 pm

For SQL as syntax, SAMS teach yourself SQL in 10 minutes by Ben Forta (despite the title) (isbn 0672325675) and SQL Cookbook by Anthony Molinaro (isbn 0596009763) have served me very well. They don' t deal with GUI interfaces, plain syntax.

covertfantom
Posts: 212
Joined: Thu Feb 02, 2012 7:42 pm

Re: SQL Coding

Post by covertfantom » Thu Feb 28, 2013 6:08 pm

The two big corporate SQL flavors at my Fortune 30 company are Oracle and Microsoft SQL. I do Microsoft - you can get a scaled back version to learn on called Microsoft SQL Server Express here: http://www.microsoft.com/web/platform/database.aspx

The great thing about Microsoft is that it allows you to scale from 'at home' developer to enterprise level pretty easily. The only downside is that it's not quite as good as Oracle in some of the larger multi gigabyte/terabyte databases and lacks a few features as well. This differential is shrinking with every release... and with the cost of Oracle so much higher than Microsoft's SQL, you're going to find alot more jobs for the platform in small to mid sized companies. My large company uses it primarily for "smaller" projects because it's cheaper. By "smaller" I mean ~4 terabyte databases.

You can find a tutorial with scenarios to solve yourself here: http://www.learn-sql-tutorial.com/Simpl ... enuHeading

You can download the sample Northwind database for the aforementioned tutorial here: http://northwinddatabase.codeplex.com/

Good luck!

Mandrale
Posts: 164
Joined: Mon Jun 11, 2012 2:55 pm

Re: SQL Coding

Post by Mandrale » Thu Feb 28, 2013 6:55 pm

Thank you guys! So my SQL and Microsoft SQL server express are both free to download?

My company has been willing in the past to pay for classes in applicable areas, do you guys know any good institutions/companies that have training locations across the country?

I am in a financial analyst role within a health care company, what form of computer programming language do you guys feel is most suitable for my industry?

Thanks again guys!

User avatar
rob
Posts: 2991
Joined: Mon Feb 19, 2007 6:49 pm
Location: Here

Re: SQL Coding

Post by rob » Thu Feb 28, 2013 7:08 pm

Mandrale wrote:My company has been willing in the past to pay for classes in applicable areas, do you guys know any good institutions/companies that have training locations across the country?

I am in a financial analyst role within a health care company, what form of computer programming language do you guys feel is most suitable for my industry?
Well.. now if you company is paying :moneybag then I would go with whatever database is prevalent in your organization. I would also look at the certifications that are available for a number of them (DB2, Oracle, SQLServer e.t.c.).

For the second part look into the predictive analytics engine and/or add-on's in the DB of your choice because that has some direct applications to finding patterns in data that you could well use in your financial analysis (What events tend to occur just before customer lapses e.t.c.). Those tool sets tend to have their own interfaces, so programming languages are not that relevant.
| Rob | Its a dangerous business going out your front door. - J.R.R.Tolkien

ourbrooks
Posts: 1575
Joined: Fri Nov 13, 2009 4:56 pm

Re: SQL Coding

Post by ourbrooks » Thu Feb 28, 2013 7:10 pm

select * from sql_dialects;

Alas, this query produces more than one row. While there's nominally a SQL standard, each database management provider has add to the language in particular ways.

Fortunately, servers for all of the major dialects are now free for small sized installations. You can start with one and check your knowledge with the others.
The list in order of commercial use is:

Oracle Express Edition
Microsoft SQL Server Express
mySQL (strangely enough, it's also from Oracle now, after they purchased Sun)
Postgresql - This is often used in academic institutions since it is closer to the standard than any of the others.

As for programming languages, it depends on what kind of "shop" you are and what kind of servers you use.
If you're just writing query applications, as versus creating web sites, then Java is widely used for IBM based installations as well as for Linux/Apache/mySql/PHP shops.

If you're Microsoft all the way, then C# or Visual Basic .NET are good candidates. Possibly, as a financial analyst, you're an Excel wiz; if so then you can also use the Microsoft languages to write backends to spreadsheets that access databases and put the results in spreadsheet.

User avatar
rmelvey
Posts: 764
Joined: Sat Sep 18, 2010 5:17 pm
Contact:

Re: SQL Coding

Post by rmelvey » Thu Feb 28, 2013 7:55 pm

I did a lot of SQL related stuff as a financial analyst for a large growing online retailer. As data gathering becomes easier and cheaper I think SQL is going to be a skill for the future. It is pretty fun if you have an interesting database to work with. I was fortunate enough to have access to one of the largest databases in the world and it was a blast writing creative queries to see the business from a new angle.

Mandrale
Posts: 164
Joined: Mon Jun 11, 2012 2:55 pm

Re: SQL Coding

Post by Mandrale » Thu Feb 28, 2013 8:11 pm

rmelvey wrote:I did a lot of SQL related stuff as a financial analyst for a large growing online retailer. As data gathering becomes easier and cheaper I think SQL is going to be a skill for the future. It is pretty fun if you have an interesting database to work with. I was fortunate enough to have access to one of the largest databases in the world and it was a blast writing creative queries to see the business from a new angle.
Do you happen to have any tutorial/training books from your past? I'm really interested in getting started with it but it's hard to find any printable manuals online.

User avatar
LadyGeek
Site Admin
Posts: 49304
Joined: Sat Dec 20, 2008 5:34 pm
Location: Philadelphia
Contact:

Re: SQL Coding

Post by LadyGeek » Thu Feb 28, 2013 8:21 pm

ourbrooks wrote:select * from sql_dialects;
:D

I find that databases need a different mindset than other programming languages. You need to think in terms of queries and records. In other languages, you think in terms of process flow, e.g. a = b + c;

Does the job opportunity really get into the details of coding, or does it use 3rd party tools to do what you want?

Learning a language is great, but remember that software engineering is not coding.

As for tutorials, you can go right to the source: Chapter 3. Tutorial (MySQL manual). See how far you get by downloading, installing, and working the tutorials. Then, find an interesting database problem to solve. For example, create a database to catalog your household inventory. What fields do you need, what does your output look like?
Wiki To some, the glass is half full. To others, the glass is half empty. To an engineer, it's twice the size it needs to be.

User avatar
rmelvey
Posts: 764
Joined: Sat Sep 18, 2010 5:17 pm
Contact:

Re: SQL Coding

Post by rmelvey » Thu Feb 28, 2013 8:25 pm

Mandrale wrote:
rmelvey wrote:I did a lot of SQL related stuff as a financial analyst for a large growing online retailer. As data gathering becomes easier and cheaper I think SQL is going to be a skill for the future. It is pretty fun if you have an interesting database to work with. I was fortunate enough to have access to one of the largest databases in the world and it was a blast writing creative queries to see the business from a new angle.
Do you happen to have any tutorial/training books from your past? I'm really interested in getting started with it but it's hard to find any printable manuals online.
TBH I just learned by reading other peoples code and trying to write my own. I was in a pretty fast paced role so I was just scrambling and always trying new things out. I'm sure there is some good stuff online though just keep looking :happy

Mandrale
Posts: 164
Joined: Mon Jun 11, 2012 2:55 pm

Re: SQL Coding

Post by Mandrale » Thu Feb 28, 2013 8:27 pm

LadyGeek wrote:
ourbrooks wrote:select * from sql_dialects;
:D

I find that databases need a different mindset than other programming languages. You need to think in terms of queries and records. In other languages, you think in terms of process flow, e.g. a = b + c;

Does the job opportunity really get into the details of coding, or does it use 3rd party tools to do what you want?

Learning a language is great, but remember that software engineering is not coding.

As for tutorials, you can go right to the source: Chapter 3. Tutorial (MySQL manual). See how far you get by downloading, installing, and working the tutorials. Then, find an interesting database problem to solve. For example, create a database to catalog your household inventory. What fields do you need, what does your output look like?
It's more of an opportunity that is looking to take .txt files that are ran each day, and designing a report in SAS Enterprise Guide to create what we are looking for, and automatically distribute it out each morning. So for this example, we are looking to distribute out 200 claims to each examiner each day, based on each examiner working in a certain pend category, and to distribute the claims based on an age priority.

So it would be creating reports like that.

User avatar
LadyGeek
Site Admin
Posts: 49304
Joined: Sat Dec 20, 2008 5:34 pm
Location: Philadelphia
Contact:

Re: SQL Coding

Post by LadyGeek » Thu Feb 28, 2013 8:35 pm

OK, just change the problem. Do you have any of the following: music collection, video / DVD library, wine, coins?

Create your inputs by entering the information in a text file. Read in the file.

Create a database, then answer questions like: How many CDs do you own of a certain artist? What is the total value of your collection? Do you have any wine that's past it's recommended age to consume?

Configure your query, then run the report. Create more complex queries, like how many CDs did I buy within the last year that have titles starting with "The"?

There's no difference between this challenge and what you will do at work.
Wiki To some, the glass is half full. To others, the glass is half empty. To an engineer, it's twice the size it needs to be.

Khanmots
Posts: 1233
Joined: Sat Jun 11, 2011 2:27 pm

Re: SQL Coding

Post by Khanmots » Thu Feb 28, 2013 8:51 pm

From my limited experience I'd say that learning to write a well-designed database is the first step in learning how to do good SQL. It'll get your brain thinking in the right paradigm... I know that every time I start poking at designing a semi-complex schema after not messing with it for a while it takes a while then kinda feels like my brain inverts and then it starts being easy and writing queries and setting things up just starts to flow.
Last edited by Khanmots on Thu Feb 28, 2013 10:05 pm, edited 2 times in total.

furwut
Posts: 1351
Joined: Tue Jun 05, 2012 8:54 pm

Re: SQL Coding

Post by furwut » Thu Feb 28, 2013 9:39 pm

Mandrale wrote:
My company has been willing in the past to pay for classes in applicable areas, do you guys know any good institutions/companies that have training locations across the country?


Thanks again guys!
Learning Tree.

User avatar
Watty
Posts: 14622
Joined: Wed Oct 10, 2007 3:55 pm

Re: SQL Coding

Post by Watty » Thu Feb 28, 2013 10:02 pm

Mandrale wrote: I am in a financial analyst role within a health care company, what form of computer programming language do you guys feel is most suitable for my industry?
If you have never really programmed before and just want to see what it is and to see if you get hooked on it then learning to program macros in Excel would be a really good place to start.

It uses a special version of Visual Basic and there are lots of tutorials and books that can teach you enough to do real useful things in just a week or two that you can use in your normal job right away that will likely wow and amaze your co-workers and boss.

Even if you decide that programming is not for you, your new advanced Excel skills will serve you will for the rest of your career.

Depending on what large computer systems you have at work they likely have various report writing tools that will allow you to access the work databases. These often have ways to get into more advanced modes where you will be basically writing SQL commands to extract the data even if you are going through some sort of graphical user interface.

KyleAAA
Posts: 6805
Joined: Wed Jul 01, 2009 5:35 pm
Contact:

Re: SQL Coding

Post by KyleAAA » Thu Feb 28, 2013 10:10 pm

The first lesson is to stop calling it "SQL code." SQL isn't a programming language, it's a query language. I'm not being sarcastic: as soon as I heard it my first response was an involuntary cringe. Learn the lingo. It's important if you want to earn the respect of techies.

Luckily, the kind of SQL queries you'll likely have to write are super simple. Do you know which particular database you'll be using? They are all very similar but there are some small differences in syntax.

Stanford has a free online course: http://www.db-class.org/

22twain
Posts: 1608
Joined: Thu May 10, 2012 5:42 pm

Re: SQL Coding

Post by 22twain » Fri Mar 01, 2013 9:40 am

rob wrote:* Grab a copy of MySQL (Free and easy enough to setup and has a decent implementation of SQL).
* Pick a project that interest you... Say building a DB of your Music (Albums -< Tracks e.t.c. e.t.c.).
That's exactly what I did about ten years ago. Even the same project, except it's for a classical-music collection. It ended up requiring eight tables to contain all the data I want, in their proper relationships.

I had already been using a proprietary general-purpose database system for it on my Mac for about 15 years. First the company went out of business, so the software became "orphaned." Then Apple migrated its Macs from Motorola 680x0 chips (which the software was written for) to PowerPC and then to Intel, so I had to keep an ancient Mac just to run the database on. That Mac eventually died, so I bought another one second hand. When that one looked like it was about to die too, I exported all the data into text files, wrote a C++ program to convert the data into table-style format, then installed MySQL on my then-current Mac, set up the SQL tables and imported the data. I've done a lot of programming over the years, in various languages, so it wasn't too hard for me, although as others have pointed out, the set-theory type mindset of SQL is very different from the procedural / object-oriented mindset of C++ etc.

As I recall, my main resources for learning were Paul Dubois's book "MySQL" (Addison-Wesley) and the online MySQL manual at mysql.com.
Last edited by 22twain on Fri Mar 01, 2013 10:08 am, edited 1 time in total.
My investing princiPLEs do not include absolutely preserving princiPAL.

ohiost90
Posts: 637
Joined: Wed Apr 11, 2007 3:24 pm

Re: SQL Coding

Post by ohiost90 » Fri Mar 01, 2013 10:04 am

Mandrale wrote:Is there anyone working in a profession where they are dealing with creating SQL on the daily basis? Any helpful tips to help someone who is looking into learning this for themselves?
I'm attempting to learn this now due to possible career advancement.. I am in a full time position and have graduated school so I have extra time to be learning and further educating myself.
Thanks!
Im a sql programmer, so yeah, I deal with creating SQL on a daily basis. The tips below is a great start to learn SQL. However, knowing SQL is just one part of my job. To complete the job, I need to present the data that is being requested. This could simply be in an excel spreadsheet but more likely a Report Services report. At times, I need to review the .net code of the application that hits one of my dbs and a few times have been asked to modified that code. Lastly, while, not a dba, I have done a fair amount of maintenance, performance, and tuning tasks during my time here.

feh
Posts: 1279
Joined: Sat Dec 15, 2012 11:39 am

Re: SQL Coding

Post by feh » Fri Mar 01, 2013 1:12 pm

Mandrale wrote: I'm attempting to learn this now due to possible career advancement.. I am in a full time position and have graduated school so I have extra time to be learning and further educating myself.
What are your current job responsibilities? Are you in the IT field?

I ask because "how do I learn SQL coding" is a bit of an odd question. It's a very narrow, specialized skill. It's not something that would land you a job by itself.

In other words, companies hire DBAs and Data Analysts, but not SQL coders. Can you give us more background info?

bourg
Posts: 63
Joined: Fri Mar 16, 2012 9:26 am
Location: Indianapolis, IN

Re: SQL Coding

Post by bourg » Fri Mar 01, 2013 1:28 pm

IT / Development isn't a "I'm going to learn how to do this then I know it forever" field.

Its a "I know enough to know what I can and can't do and I'm really good at google to search and find how to do what I want to make it do."

In other words, get good at googling and searching sites like stackoverflow for solutions to your problems and you'll be an excellent SQL developer. The only "bad" coders I've worked with were people that had no skill to find answers for themselves. I promise that 99.999999% of anything you want to make a computer do has been done by someone before and posted to a messageboard online.

User avatar
JupiterJones
Posts: 2703
Joined: Tue Aug 24, 2010 3:25 pm
Location: Nashville, TN

Re: SQL Coding

Post by JupiterJones » Fri Mar 01, 2013 4:17 pm

JuanZ wrote:[...] and SQL Cookbook by Anthony Molinaro (isbn 0596009763)
Seconded.

I have a copy of it within arm's reach as I type this.

JJ
Stay on target...

User avatar
JupiterJones
Posts: 2703
Joined: Tue Aug 24, 2010 3:25 pm
Location: Nashville, TN

Re: SQL Coding

Post by JupiterJones » Fri Mar 01, 2013 4:24 pm

Mandrale wrote:Thank you guys! So my SQL and Microsoft SQL server express are both free to download?

My company has been willing in the past to pay for classes in applicable areas, do you guys know any good institutions/companies that have training locations across the country?

I am in a financial analyst role within a health care company, what form of computer programming language do you guys feel is most suitable for my industry?

Thanks again guys!
Depends on the tasks you perform in that job. If it involves heavy-duty statistics/modeling/etc., you should probably take a look at R. CodeSchool has a crash course.

If you're fooling around with Office products a lot (Excel, Access, etc.), then SQL will help, but so will VBA.

Learning SQL is fairly easy. Wrapping your head around the sorts of relational databases you'll be querying with SQL is less easy.

JJ
Stay on target...

Mandrale
Posts: 164
Joined: Mon Jun 11, 2012 2:55 pm

Re: SQL Coding

Post by Mandrale » Fri Mar 01, 2013 4:32 pm

feh wrote:
Mandrale wrote: I'm attempting to learn this now due to possible career advancement.. I am in a full time position and have graduated school so I have extra time to be learning and further educating myself.
What are your current job responsibilities? Are you in the IT field?

I ask because "how do I learn SQL coding" is a bit of an odd question. It's a very narrow, specialized skill. It's not something that would land you a job by itself.

In other words, companies hire DBAs and Data Analysts, but not SQL coders. Can you give us more background info?
Doing a majority of my work in excel but we are starting to use more of SAS enterprise guide. Within EG we have a large amount if reports that can't be completed with the basic point and click options in base SAS. So, we have to do coding to accomplish what we want. We just had a report built for us by a member of SAS so I have the coding behind it, but obviously not the knowledge to understand it all. This report was something like the following:

Take a list of 10,000 claims that will change each day, group them based on a "pend" column, order them by age with the oldest claims benign first, then assigning 200 claims each day to all 10 examiners. Where the complication comes in is that multiple people work on the same pend.. So you have to decipher on splitting out between all the people that work on that pend. From there, also send another document that has the remaining 8000 claims to all examiners, so if they finish their 200 they have anothe list to work on which is also sorted by age.

So it's a pretty complicated report that we had to use coding for with grouping by tables and such.

User avatar
JupiterJones
Posts: 2703
Joined: Tue Aug 24, 2010 3:25 pm
Location: Nashville, TN

Re: SQL Coding

Post by JupiterJones » Fri Mar 01, 2013 4:34 pm

KyleAAA wrote:The first lesson is to stop calling it "SQL code." SQL isn't a programming language, it's a query language.
A common misconception. When programmers think about what a "programming language" is, they almost always think exclusively of Turing-complete, imperative programming languages. But declarative languages like SQL are rightly classified as programming languages too. And you technically don't have to be Turing-complete to be a "programming language".

So you wind up with one of those situations where calling SQL a programming language is actually correct, although you sound really weird to most people when you do it.

Kind of like correctly pronouncing "forte" so that it rhymes with "port"... it's considered wrong by so many that it almost doesn't matter that it's right. :P

JJ
Stay on target...

KyleAAA
Posts: 6805
Joined: Wed Jul 01, 2009 5:35 pm
Contact:

Re: SQL Coding

Post by KyleAAA » Fri Mar 01, 2013 5:35 pm

JupiterJones wrote: A common misconception. When programmers think about what a "programming language" is, they almost always think exclusively of Turing-complete, imperative programming languages. But declarative languages like SQL are rightly classified as programming languages too. And you technically don't have to be Turing-complete to be a "programming language".
Granted, but you still sound like an idiot when you use it that way. Either way, I wouldn't recommend anybody, especially a newbie, go down that path.

User avatar
Epsilon Delta
Posts: 7450
Joined: Thu Apr 28, 2011 7:00 pm

Re: SQL Coding

Post by Epsilon Delta » Fri Mar 01, 2013 9:10 pm

JupiterJones wrote: When programmers think about what a "programming language" is, they almost always think exclusively of Turing-complete, imperative programming languages. But declarative languages like SQL are rightly classified as programming languages too. And you technically don't have to be Turing-complete to be a "programming language".
But SQL, at least the modern version, is Turing-complete. Can something be Turing-complete and not a programming language? (well, something other than the MS-DOS shell, that can't possibly be a programming language, even if it's Turing-complete).

HurdyGurdy
Posts: 1172
Joined: Wed May 09, 2012 10:21 pm

Re: SQL Coding

Post by HurdyGurdy » Sat Mar 02, 2013 12:47 pm

I am in a financial analyst role within a health care company, what form of computer programming language do you guys feel is most suitable for my industry? [...]

Doing a majority of my work in excel but we are starting to use more of SAS enterprise guide. Within EG we have a large amount if reports that can't be completed with the basic point and click options in base SAS. So, we have to do coding to accomplish what we want. We just had a report built for us by a member of SAS so I have the coding behind it, but obviously not the knowledge to understand it all.
Why don't you learn SAS then?

Mandrale
Posts: 164
Joined: Mon Jun 11, 2012 2:55 pm

Re: SQL Coding

Post by Mandrale » Sat Mar 02, 2013 3:48 pm

JuanZ wrote:
I am in a financial analyst role within a health care company, what form of computer programming language do you guys feel is most suitable for my industry? [...]

Doing a majority of my work in excel but we are starting to use more of SAS enterprise guide. Within EG we have a large amount if reports that can't be completed with the basic point and click options in base SAS. So, we have to do coding to accomplish what we want. We just had a report built for us by a member of SAS so I have the coding behind it, but obviously not the knowledge to understand it all.
Why don't you learn SAS then?
If I'm not mistaken, the coding that SAS uses is SQL.

ourbrooks
Posts: 1575
Joined: Fri Nov 13, 2009 4:56 pm

Re: SQL Coding

Post by ourbrooks » Sat Mar 02, 2013 5:02 pm

SAS stands for Statistical Analysis System; originally, it was a statistical package with its own languauge, but it is now integrated with other software, including relational databases. If you want to do SAS analyses, then you'll need to learn the SAS language. If someone else has already set up the procedures so that that the results end up in a relational database, then you'll have to learn SQL to do things.

As to the previous discussion about whether SQL is a programming language or a query language, it depends what you're referring to. For every major relational database, there's a programming language which uses Sql syntax for queries; in the case of Microsoft SQL server, it's called tSQL; in the case of PostGreSql, it's PL/pSQL, etc. These other languages have explicit loops, etc.

User avatar
rpike
Posts: 476
Joined: Mon Mar 19, 2007 10:14 pm
Contact:

Re: SQL Coding

Post by rpike » Sat Mar 02, 2013 8:55 pm

MathWizard wrote: Play with SQL and learn something about SQL using the website
http://www.w3schools.com/sql/sql_tryit.asp
This site is pretty good. I recommended it to my group along with http://sqlzoo.net when I gave a tutorial session to my group.
The basics of SQL are common regardless of RDBMS (Oracle, MySQL, etc.), but there are some differences - especially in the functions to do things like date or string conversions.

Another Rick

Post Reply