Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Learning t-sql

Author  Topic 

prodigy2006
Yak Posting Veteran

66 Posts

Posted - 2010-03-09 : 12:24:49
I've always struggled to learn t-sql language(infact any programming language). I tried reading few books on t-sql but I only get through the initial pages.
Would some one help in letting me know the interesting way to learn t-sql language.

Thanks everyone.

SreenivasBora
Posting Yak Master

164 Posts

Posted - 2010-03-09 : 13:48:04
create master/details table(s) and start writting queries (DML, DDL,DCL etc) whenever you get errors Look for BOL or google it. Dont read any books. Try to use as much as all functions (related to date/numeric/string functions) resolve by your own. Write complex loopings and calculations and try to optimize it (Example dont use PIVOT function , try to acheive this from queries OR dont use CTE feature try to achieve this from queries).

Hope U will enjoy this.

With Regards
SR
Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2010-03-10 : 05:19:51
Like anything else it's very hard to get into it unless you are actually using it.

What's your day to day job?

If you want to learn programming / sql then the best thing to do would be first think of something you want to end up with (a simple program to keep track of finances or similar) and then think of the data model.

For example : say you played 5 a side football each week for work (or basketball or whatever) and you wanted to store the data from the games in a database. You'd have to think about table structure. You'd probably want tables: (this is very quick and general)

Player (firstname, surname, ...., ... )
venue (name, address, ....)
game (venueLink [Link to the venue table], [gameDate] Datetime, ....)
..
..
And so on ( in actuality this would be quite a complex data model because you'd have to think of the fact that players can play for different teams -- teams change per game etc, etc).

If you get the data model right then it will be easier and more obvious how to write queries

I.E find the top 5 scoring players that played in the last 5 games etc.



Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

ahmad.osama
Posting Yak Master

183 Posts

Posted - 2010-03-11 : 00:47:13
quote:
Originally posted by prodigy2006

I've always struggled to learn t-sql language(infact any programming language). I tried reading few books on t-sql but I only get through the initial pages.
Would some one help in letting me know the interesting way to learn t-sql language.

Thanks everyone.



quote:

Don't go for something u r not good at. Instead Improve your skills
in the field u r good at.



this is my take on this.
Go to Top of Page
   

- Advertisement -