Shamil Salakhetdinov
shamil at SMSConsulting.spb.ru
Mon Oct 20 13:03:32 CDT 2003
<<< I do have this book, and I agree, an excellent book .... The Guru's Guide to Stored Procedures, XML and HTML >>> Thank you, Ken, I've ordered both today :) As for (SQL)XML I'm especially intrested in real-life examples of using updategrams and/or diffgrams hoping that they will let to use less coding on MS SQL Server side - am I dreaming/wrong with my hopes? - I expect that updategrams/diffgrams will allow to use generic (template) code to Add,Update, Delete specific tables' rows via stored procedures? - I mean that I expect that a specific (CUD) stored procedure for a specific table might be using a generic(template) T-SQL code and updategrams/diffgrams' XML strings automagically generated by ADO.NET Datasets to create, update, delete this specific table's rows thus there will be no need to use parameters in CUD stored procedures for every table field's value. And as a result I will have a very strictly secured MS SQL database with no permissions for tables/views CRUD operations except via using stored procedures. I don't see that what I dream about is possible - I've found only this example in BOL's "Sample Visual Basic Application to Update Records Using OPENXML and ADO": CREATE PROC update_employee @empdata nvarchar(4000) AS DECLARE @hDoc int exec sp_xml_preparedocument @hDoc OUTPUT, at empdata UPDATE Employee SET Employee.fname = XMLEmployee.fname, Employee.lname = XMLEmployee.lname FROM OPENXML(@hDoc, 'update/Employee') WITH Employee XMLEmployee WHERE Employee.eid = XMLEmployee.eid EXEC sp_xml_removedocument @hDoc This isn't bad already - no need in lengthy parameters' list (still to check it works well) but why they don't let to do something like?: CREATE PROC update_employee @empdata nvarchar(4000) AS DECLARE @hDoc int exec sp_xml_preparedocument @hDoc OUTPUT, at empdata UPDATE Employee SET VALUES BY NAME FROM OPENXML(@hDoc, 'update/Employee') WITH Employee XMLEmployee WHERE Employee.eid = XMLEmployee.eid EXEC sp_xml_removedocument @hDoc Anybody to shed any light on that subject? Shamil ----- Original Message ----- From: "Stoker, Kenneth E" <Kenneth.Stoker at pnl.gov> To: <dba-sqlserver at databaseadvisors.com> Sent: Monday, October 20, 2003 7:56 PM Subject: RE: [dba-SQLServer]Stored Procedures Book Recommendations > Shamil, > > I do have this book, and I agree, an excellent book. I have used it many times. I have been looking into Henderson's latest book, The Guru's Guide to Stored Procedures, XML and HTML on Amazon.com. There are quite a few reviews for it, something over 50, and got an average 4.5 stars out of 5. I think that is where I will probably go. > > I will also look into Advanced Transact-SQL for SQL Server 2000 by Ben-Gan, but at the moment, I have like Ken Henderson so much that I will probably stick with him. > > Thank you all. > > Ken Stoker > Technology Commercialization > Information Systems Administrator > PH: (509) 375-3758 > FAX: (509) 375-6731 > E-mail: Kenneth.Stoker at pnl.gov > > > -----Original Message----- > From: Shamil Salakhetdinov [mailto:shamil at smsconsulting.spb.ru] > Sent: Monday, October 20, 2003 4:25 AM > To: dba-sqlserver at databaseadvisors.com > Subject: Re: [dba-SQLServer]Stored Procedures Book Recommendations > > > Mark, > > This book > > The Guru's Guide to Transact-SQL by Ken Henderson (Author) > > has very good all five-stars reviews like e.g. > > <<< > Reviewer: Tom Davis from Portland, OR USA > Everything you could ask for in a Sql book: all kinds of secrets and best practices, performance tips, etc. By far the best book of it's kind. > > Reviewer: A reader from LIttle Rock, AR > I didn't know what to expect with this one but was pleasantly surprised. Very indepth material. The undocumented stuff is probably my favorite. Covers everything about t-SQL from A-Z. Highly recommended. > >>> > > I don't have it but I'm going to purchase it. > > HTH, > Shamil > > ----- Original Message ----- > From: "Mark L. Breen" <subs1847 at solution-providers.ie> > To: <dba-sqlserver at databaseadvisors.com> > Sent: Monday, October 20, 2003 12:18 PM > Subject: Re: [dba-SQLServer]Stored Procedures Book Recommendations > > > MessageHello Robert, > > I have had a look at the reviews on Amazon.Co.Uk and they are mixed, the book costs GBP£43 which is €64 for me, have you found his books to be good or brilliant? > > I am looking for something that will give me new ideas on how to use SQL to the max (so to speak). > > Sometimes I find that there are ways of doing things that we never think of and when we read a book that outlines we can use the technique every day from there on, I guess that is what I am looking for, > > Kenneth, did you get around to purchasing a book?, if so, how did you get on with it. > > Thanks in advance for your time, > > Mark > > > > > ----- Original Message ----- > From: Djabarov, Robert > To: dba-sqlserver at databaseadvisors.com > Sent: Wednesday, October 15, 2003 10:38 PM > Subject: RE: [dba-SQLServer]Stored Procedures Book Recommendations > > > > anything written by Itzik Ben-Gan will do it. (Advanced Transact-SQL for SQL Server 2000) > > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stoker, Kenneth E > Sent: Wednesday, October 15, 2003 4:01 PM > To: dba-SQLServer at databaseadvisors.com > Subject: [dba-SQLServer]Stored Procedures Book Recommendations > > > Everyone, > > I am starting to get into some quite complicated stored procedure development, and was wondering if anyone here had any recommendations for a good reference book on the subject. > > Thanks. > > Ken Stoker > > Technology Commercialization > > Information Systems Administrator > > PH: (509) 375-3758 > > FAX: (509) 375-6731 > > E-mail: Kenneth.Stoker at pnl.gov > > > > > -------------------------------------------------------------------------- -- > -- > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com >