Upending Preconceived Notions

T-SQL Tuesday

This months T-SQL Tuesday (January 2022) invite is brought to you by Andy Yun – @sqlbek.

Andy’s asked us to write about preconceived notions.

T-SQL TuesdayI’ve not written in T-SQL Tuesday for quite some time – so, why not resolve to get 12 T-SQL Tuesday posts in for ’22 (12 in 22 🙂 ), and while I’m at it revisit my blogging journey. I’m not sure why I stopped blogging regularly, maybe I have a preconceived notion that nobody would read my stuff!

Anyway, before I put pen to paper (so to be speak) – or more accurately fingers to keyboard, I decided to have a look around the web at the definitions for “Preconceived Notions” – I like this one,

“a personal belief or judgment that is not founded on proof or certainty”

And my problem for at least the early part of career was that I was too willing to take the word of other people at face value, even when I suspected they weren’t correct rather than debating with them. I guess I had the preconceived notion that others preconceived notions (that often they were quite happy to tell anybody who cared to listen about) were correct.

Here’s an example, somebody once told me ‘All cursors are bad, never write one’ – and then their preconceive notion became mine (unfortunately)

Now, I soon found that cursors did have there uses, maybe not as a standard approach in production, but certainly to help me ‘write code , that writes code’.

I used them for things like, generating comma separated lists for select statements that I’d pulled from INFORATION_SCHEMA views.

I used then to create multiple DDL statements and cycle through a list, executing individual statements programmatically- usually just on my local dev machine.

Most of this type of thing I can now do with other concepts, such as XML for generating CSV lists or window functions for retrieving values from rows other than the current one.

While my use of cursors has probably subsided over the years, I still use them – but mainly when I’m developing to ‘write code, that writes code’

The moral of story – I think – is avoid letting other peoples reconceived notions become your preconceived notions, that how myths start and are continue.

I soon learned my lesson to question everything, the world revolves around people – or is it data? – but that’s just an expression, or is it yet another preconceived notion 🙂

Have a great day.

Cheers

Martin.

One thought on “Upending Preconceived Notions”

Leave a Reply

Your email address will not be published.