Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Title says it all!

 

I'm fairly confident with queries and aggregate functions etc. but I know that T-SQL can do a hell of a lot more if you know what you're doing, so I'd like to learn.

 

Any recommendations welcome :)

Posted

The subject is quite wide - so it kind of depends what you want to achieve.

 

Professional Microsoft SQL Server 2008 Programming by Robert Vieira might be OK. There are a lot of web based resources too (unfortunately quality is variable).

 

MSDN does have some useful stuff.

  • Thanks 1
Posted
The subject is quite wide - so it kind of depends what you want to achieve.

 

I suppose I need to start with the basics of T-SQL programming so I can get an idea what you can do and the limitations. Interested in writing data manipulation scripts (particularly with regards to XML) and server side functions initially.

 

Professional Microsoft SQL Server 2008 Programming by Robert Vieira might be OK. There are a lot of web based resources too (unfortunately quality is variable).

 

MSDN does have some useful stuff.

 

Yeah I have been struggling to find quality material online, that's why I'm asking here. Lots of people copy and pasting scripts with no idea how they work.

 

I'll take a look at that book, thanks

Posted

Beginning T-SQL covers stored procedures and XML data types. The first few chapters deal with stuff you probably already know, but that might lull you into a (hopefully not false) sense of comfort! There's an update for 2012 - I only have the 2008 copy.

 

Wrox beginning T-SQL is also on our shelves. It's a meatier tome but I can't see at a quick glance that it covers processing XML datatypes.

  • Thanks 1
Posted
Beginning T-SQL covers stored procedures and XML data types. The first few chapters deal with stuff you probably already know, but that might lull you into a (hopefully not false) sense of comfort! There's an update for 2012 - I only have the 2008 copy.

 

Wrox beginning T-SQL is also on our shelves. It's a meatier tome but I can't see at a quick glance that it covers processing XML datatypes.

 

Thanks, the more material I can get my hands on the better!

 

As for the XML, this is where I'm struggling to find advice online: vast majority of articles I can find are talking about the SQL XML data type, whereas what I'm trying to do is actually map XML documents to SQL fields, as opposed to storing the raw XML in SQL. I did find a method of doing this (though I have been having a little trouble with it: http://www.edugeek.net/forums/web-development/125614-dealing-missing-xml-import-sql.html) but it's extremely slow, I'm talking 4 hours for a document in XML format that takes 5 minutes if that XML is converted to CSV and imported via a BULK INSERT. I suspect it's because rather than mapping nodes to columns, it's actually searching the entire XML document for every record. I strongly suspect that there'll be a way of doing this more efficiently using XPath queries or similar, just need a bit of guidance I can work with.

 

For now of course I'm converting everything I can to CSV and importing that for the massive time saving but I'm the sort who doesn't like to be beaten until I've exhausted all options!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...