I am still trying to make sense of the whole n' when selecting text or varchar values... Is that so necessary? Can someone give me an example?
To summarize what the other folks on this thread have said, the N' is how you mark string literals as NVARCHAR literals. If you're working with NVARCHAR datatypes, such as when they appear in sp_ExecuteSQL or table columns with an NVARCHAR datatype, it's best to use the N' prefix. It's also best NOT to use it on string literals when comparing to a VARCHAR column in a table because using the N' prefix on a literal to be compared to a VARCHAR column requires that the whole column of data must be converted before the comparison can be made. That's obviously a "Non SARGable" comparison of the worst kind.
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs