Does anyone know where I can get SQL server documentation pertaining to writing stored procedures (SQL Server 2008 R2)?
I Tried browsing SQL Server 2000 Books Online but find it very hard to use with links scattered all over the place.
I am particularly interested with built in functions (T-SQL), that includes examples, maybe in a pdf form also ?
Here is a list of built-in functions on MSDN. Get used to using MSDN; it's a great reference but you have to learn its quirks.
Here is a good article about stored procedures, i guess it will give you some useful info.
Related
I have a question in regards to the SQLXML for SQL Server.
My assignment is to convert an XSD file so that it magically "becomes" tables in the SQL Server database. I've looked around everywhere, on all the links I could possibly find, but nothing clicks. Everything is like a half-step of what I need to achieve.
I am not too familiar with Visual Studio, haven't done much else than running database queries and all the stuff one likes to do in a SQL Server database. Except for XML.
I figured that SQLXML from Microsoft's MSDN would be a good tool to have (and I believe it's already installed).
Any tips or solutions?
Thanks.
There's no magic involved, and as it's homework/study I won't detail how to do it myself, but if you direct your research towards SQL's Bulk Load functionality it would seem to be what you need.
Read this article for a brief "how to" guide.
Or this article for a detailed description of how to use it.
You can convert XSD to SQL using this approach https://github.com/ujhgj/xsd2sql
But I'm not sure of SQL dialect. That thing worked for Mysql.
I have looked through many pages trying to find this information but all I get is the backbone structure and how the SQL server runs. What I would like to know is the difference of commands. Which commands can you use in 2008 but are not supported in 2005 with or without adjusting the compatibility level. I design different queries and my clients differ in their database versions. So when I create something, I would like to know if it will work before I put the time in or start actually breaking my head over why the code doesn't work on the clients computer but it does on mine. An example would be Pivot where I have to change the compatibility.
So what commands have changed? Either a link to a page or if it's not much to type out, it would be greatly appreciated.
This technet article has a list of the new commands in SQL 2008 T-SQL
There is some info here but it's not a whole lot so I am suspect that it's complete listing
http://msdn.microsoft.com/en-us/library/ms143179(v=sql.100).aspx
Version control!
Usually lower version's commands are available and work well in higher versions. But not quite the other way around. Take a look at the following post.
Advantages of SQL Server 2008 over SQL Server 2005?
For each major version Microsoft does release improvements done or changes made under product info.
yesterday i went for an interview to be a sql / .net developer. my experience with sql is limited to basic pl/sql with oracle. they drilled me "do you know ssrs, do you know tsql, etc" well i kept saying no because i havent worked with them.
question: what do i have to learn in order to be able to work with microsoft sql? is it really that much different than oracle?
Grab a copy of SQL Server Express (see here) and start playing with it. There are sample databases that you can download to get you started.
SQL is the same, as it's a standard. T-SQL is an add on that has some flavors that are helpful to know. The way you setup procedures, functions, etc. is also different than PL-SQL, so that would be good to read up on. Outside the SQL Server engine and the various built-in tools, there are a lot of other MS products:
SSRS - SQL Server Reporting Services features a reporting engine, which are developed in Visual Studio.
SSIS - SQL Server Integration Services is a data import/export, etc. process, it's very handy to use for data import/export and other batch processing
SSAS - Analysis Services for OLAP
And so on. I don' tknow that SSAS helps you in this regard, but SSRS is pretty big so as a developer, reporting is a key feature and that would be handy to know something about. SSIS is good to know a little bit about, but might not be that handy, depending on what the org's needs are.
HTH.
SQL is pretty much SQL. There are some engine-specific differences but for most apps they're not significant. The management tools are obviously different. The OOB tools are vastly different.
SSRS is a reporting package (think Crystal reports on double steroids and you'd be close) not a DB engine. That should be listed as a separate job requirement.
I'd say get an MSDN license OR the free trial for SQL Server and install them all and try them out. Bookstore is a fairly generic app that you can extend forever and tryout new things.
Just keep in mind that someone hiring you is still going to want actual app experience, not your trials. If you can't get it at work, volunteer at an organization.
A good place to start is reading the MSDN SQL Server resource page. You'll find good information there about the whole MS SQL Ecosystem.
Then get a trial license, a virtual machine and start playing around.
It's kinda limited to their knowledge, as if you know basic ANSI sql then you can get almost all the basics running on SQL Server as they have a common base. As for SSRS, that is specific and will require reading and playing with it to learn. The SQL2008 Express with Advanced services should help you out.
With .net developer interviews I've been to they expect you to know the basics at minimum and be able to do joins and stuff in sql. Learning how to do temp tables and stored procedures as well as updates/selects/deletes and stuff should get you a bit further.
Potentially if they want that kinda experience either they are aiming the roll too low, or you've managed to slip through the net for a higher level role (which is sometimes a good thing) :-)
What is a good way to learn to develop SQL Server(2005) stored procedures? I am primarily a java developer but need to take on SQL Server stored procedure development. I have some basic SQL in my background but nothing major. Any good specific tutorials maybe using the adventure works schema? Or just good reference sites that contain alot of useful syntax.
I would say either the abundance of good resources or a very useful couple tutorials will be the winner.
Personally there are two ways that I have found to get up to speed quickly.
Have real world problems that you need to solve.
Get a good T-SQL Book. There are numbers of them out there, most of the Microsoft Press ones are good, along with many others.
it depends what you're trying to do really. A good knowledge of SQL is the main requirement. Above that learn about parameters.
I find most people don't put too much logic in SPs these days. Rather they're just a collection of standard SQL statements using parameters.
Just searching for SQL syntax on the internet has pretty much asnwered any question I've had. If nothing else you can always buy a reference book. I have Transact Sql programming by O'Reilly.
Plus, stored procedures are really just
CREATE PROCEDURE [PROC_NAME]
AS
BEGIN
--ENTER YOUR SQL CODE HERE
END
I always start with MSDN for Microsoft products.In most of the case they are good.
And there is nothing much specific to learn from Java side for MSSQL SPs as they are seperate entities existing in DB except invoking it from front end.
I would start here.
I am looking for good resources on Stored Procedures. Particularly for Microsoft SQL server 2005, but any overall good resources for SQL will do. These can be books, websites, etc.
Thanks
I like www.simple-talk.com/sql/. Check out their SQL Server Crib-Sheet Compendium.
Look for TSQL resources, because SPs are coded in TSQL.
A good advanced guide to T-Sql is "The Guru's Guide to Transact-SQL" by Ken Henderson. It's becoming kind of a classic.
I think this might be a good book. Just had a look on sample pages so don't have a deeper idea.
You may download the Ebook as well.
SQL Server 2000 Stored Procedures Handbook (Expert's Voice)