![]() Note: To learn why database management requires a systematic approach, please read Different Stakeholders, Different Views: Why Database Management Requires a Systematic Approach article. Having all the common mistakes added to the checklist document is a great way to create awareness and ensure good code quality over a period of time. ![]() Catching a bug early in the process is inexpensive and easier to resolve, than compared with a bug caught later in the game. It is essential for developers to be aware of the coding guidelines while working on their code changes. Having a Code Review Checklist is indispensable since it ensures that the best practices are followed and reviews are performed consistently. I left out far-east languages like Japanese and Chinese from the following example on purpose because those languages have a few other considerations that I’ll save for another blog post.In a software development life cycle, Code Review plays an integral role in improving the product quality. I have used Google Translate to get the characters of other languages. The following scripts demonstrate saving and retrieving multi-lingual data to and from SQL Server. If the correct data-type is not used or the data is not preceded with an N, SQL Server will save the data to the table as ‘?’ or another garbled character. You must precede all Unicode strings with a prefix N when you deal with Unicode string constants in SQL Server Please feel free to share you feedback in the comments.ĭownloads, SQL Server, TSQL Complexity, Estimation, Stored Procedure, TSQL How to Store (and Retrieve) Non-English Characters (e.g. Included objects that may not be refering to other objects. In case this seems useful then the script to create that report is available for download at Technet.Ģ013/Feb/15 – Version 1.1 Added the CASE statement for complexity.Ģ014/Apr/29 – Version 1.2 Added Database and Schema name to the report. Even then, it could be a useful reference point. The number of lines of code is a subjective metric here because it depends on the developer’s coding style and use of whitespace. I have not included those calculations here because they depend entirely on the estimator’s perception of complexity and the developer’s skill level. I used that output and put in some more formulas to assign a complexity level (simple, medium or complex) and the approximate number of minutes required to review that procedure. I patched together a script that produced a report similar to the example below. I had in mind that something like number of lines of code, number of dependencies and parameters in the stored procedure would give a good starting point to create such an estimate. I wanted to find the complexity of the stored procedures and arrive at an estimate of the effort required to review all them. ![]() I had a recent project where we planned to re-factor an existing application’s. Script output would look like the example below –ĭownloads, TSQL Downloads, Scripts, SQL Server, TSQL Calculate TSQL Stored Procedure Complexity I’m sharing it for my future reference and probably others with smaller number of tables would find it useful too.įor a faster (but not with all these output columns) script, look at Erland Sommarskog’s response in the forum thread.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |