I think I have a good grasp of SQL and the most features it has, but sometimes when I've done some more advanced Reporting Services a fellow developer has helped me with some stuff and when I open some existing procedures in T-SQL I understand that I have some learning to do. I think I have focused more in later years at application code (C# and javascript mostly) and somehow my SQL skills aren't there where It should be. Because at work the most stuff is very database centric with procedures, so I think I need to get better at SQL. But when I google around about features and look in books about SQL I know the most stuff, but somehow getting better at SQL ain't so easy any more. Does anybody have any advice how to become an advanced SQL programmer? What books to pick up? By the way I work exclusively with SQL Server.
I've done tons of basic procedures with inserts, updates, selects with joins and group by and so on. But doing bigger problems I've always done a more application-centric approach with arrays and collections, but sometimes (Reporting) there's no choice than do it in SQL and work with temporary tables and so on. I'm tempted to do cursors because then I can loop through everything but that kills database performance (how about looping through a half million rows with a cursor?).