Bare Knuckle Pickups Forum
At The Back => The Dressing Room => Topic started by: Ian Price on July 10, 2009, 11:28:38 AM
-
Hello all,
Does anyone on here use SQL? If so do you know of any good reference websites? I'm pretty much self taught on it and can do basic queries, joins etc but want to learn a bit more detailed stuff.
Cheers,
Ian.
-
Try http://www.w3schools.com/sql/default.asp for a reference otherwise Google is my friend when I forget how to do things or need some specifics. There should be plenty of example sites out there. Best way to learn is to do just do it.
-
I've used it for almost 20 years now, starting with DB2, then Sybase, Informix, Oracle, SQL Server and even Access! What you could do is download Oracle for your personal use - it is free and there is a lot of documentation around for it. Other than that, as Shobet says, just playing with it is the best way to learn it.
-
What are you going to be doing with it, Ian? SQL has some subtle differences in its flavour, certainly between Oracle and MSSQL.
Personally, I'm a big fan of O'Reilly books. I know that there are loads of resources online, but sometimes you just need a good solid book and a few hours of geek time!!!
Mark.
-
+1 for w3schools, I used it for loads of stuff. Very good for learning from scratch or just brushing up on some skills. The tests are a nice addition too.
-
I use MS SQL (2000 mostly for work, and 2005 for a side project). I'm self taught and I don't consider myself an expert at all, but I find most thing I need with a google search. However that isn't a structured approach. If that's what you are after then O'Reily are pretty good, or even the Dummies books depending on where you are starting from.
Is there a specific problem you have?
-
Cheers for the responses guys - very useful. I think practice makes perfect is the solution for me.
As far as problems go there is nothing specific. The role I do at the moment relies on quite a few queries on our database (pretty sure it's oracle 10g). I can code and run a few myself but struggle with more detailed ones and creating in line views (still don't fully understand this but the link provided earlier in the thread may help). The issue is that some of my work is not project related meaning that there is no analyst assigned and I have to go through the hell of IT prioritisation!
Also, it is only reporting I do against the database and as such I only have view access.
-
By inline views I assume you mean temp tables, of the type:
SELECT temp.*
FROM (SELECT *
FROM Table1 AS t1
INNER JOIN Table2 AS t2 ON t1.id = t2.id
) AS temp
WHERE temp.id = @something
They are very useful, particularly if you need to put counts or other calculated values into a single row. You can nest these as well, although that really bakes my noodle.
One tip I'd offer (although you probably already know this) the graphic query compilers write really ugly SQL code, I always code 'by hand', and I always use alias's as it makes the select and where clauses much easier to read.
-
Basically when i have a problem with something, i just google it!
The O'Reilly books are good though, we have a few of those lying around the office, its just important to remember the differences between Oracle SQL, iSql etc etc.