Skip to content

Variables in Dynamic SQL

'I had someone ask me about this the other day. Specifically getting variable data out of a dynamic SQL statement. I should point out here that I really enjoy dynamic SQL. I find it fairly intuitive and always enjoy the challenge, so I’ve gotten pretty good at it. So I just kind of threw an answer out there. Unfortunately, that didn’t clear things up. So I had to find another way to explain the subject. Which brings us to the teaching/blogging advice of the day. This person is very senior, knows SQL far better than me in a lot of areas. Dynamic SQL just isn’t one of them. The moral being, never be afraid to blog about a subject no matter how easy it sounds to you. Just because it’s easy to you doesn’t mean it makes sense to someone else.

Getting back on topic, the discussion I had with them gave me an idea for (what I think) is a really easy way to understand how to use input and output variables with dynamic SQL.'...

http://www.sqlservercentral.com/blogs/sqlstudies/2017/11/16/variables-in-dynamic-sql/

Trackbacks

Keine Trackbacks

Kommentare

Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.

Kommentar schreiben

Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss, um dieses Verfahren anzuwenden.
CAPTCHA

Formular-Optionen