• After being an avid reader of articles by Steve Jones and others of his ilk, I am always ready to learn from those who know more than I.   But which one do I use? Oh so many ways...  with all the sources available we can sometimes get buried under the google searches and the SQL code sites all offering 'The Solution' and depending on the situation, sometimes the expdient becomes the solution and the best solution is overlooked.   We all have horror stories of impossible timeframes, impenetrable attitudes or last minute additions, these are part of doing what we as DBA's and developers have to contend with.  But as with most things, I find, moderation being the key.  Part of what I see as my role is to educate not only myself, but also those with whom I work.  I'm not a guru nor a SQL god, but just a humble SQL Server DBA and VB Developer thats been keeping the wolf from the door using that one word.   Just because I can do something doesn't mean I should.  But that said, we only grow by experimenting and discovering.   With that moderation in mind, the more 'arrows' I can put together the better off my working day will be.   So where do we go from here ?  With more and more functionality and bells and whistles, I keep reminding myself - do the Basics

     

    1.  Comment.    You will not be the only one who reads your code.

    2.  Consistant.    Be consistant in how you code, like naming variables - i & j for every variable is just takes the fun out my day !!

    3.  Complete.     Complete the code, don't leave a return hanging (nothing assigned to it) or print statements like 'Something needs to go here Code = 9'   Yup that a real one !!

    4. Cursors.   There is a better way.

     

    Finally never be too afraid to ask the question - Is there a better way ?

     

    CodeOn.. and thanks.