Hi Eliassal. It was nearly two years ago that I wrote the article, so please forgive me for being rusty. There are embedded line feeds in the function, so if you change your query results to be returned as text then it should make far more sense!
In the time since the article was first published I have significantly improved this process; added support for deleted\audit tables, automatic procedure rebuilding via DML triggers, integration with SQL Server Data Tools, and more. I will be writing about this soon - post my MCM lab exam in ten days - and hopefully doing an hour long session on it at SQL Bits (session accepted but you never know if you will make the final cut hey).
Glad you liked the article. As I say, a much improved version will be up soon. I say versions but it may well be a stairway series, as it could easily span five articles.
And the compare stuff, that rocks! Although SQL Server Data Tools does a damn fine job of this too and has intellisense.
James A Skipwith (1/1/2013)
... Glad you liked the article. ...
It was a great inspiration. I used this for a while and then made some improvements also. First I converted this to a Dot. Net executable as all the string handling needed was easier there. So if you want to keep it strictly in SQL Server then use a CLR procedure. Secondly our coding standards and me yelling about consistant object naming allowed me to take several shortcuts others might not be able to use. That is why I have not shared my version.
I look forward to reading your new series.
Thanks for the interesting article.
“rawheiser” said: “I have used "SQL making SQL" before in generating audit trail triggers.”
I am considering copying this code and doing exactly that since a couple of current projects are using VS-Lightswitch (and, indirectly, Entity Framework). In that situation, stored procedures seem to be more trouble than they are worth. Triggers are the obvious way to populate audit tables.
That might be a good idea for a follow-up article.
Viewing 4 posts - 46 through 48 (of 48 total)