May 17, 2019 at 9:05 pm
Is there a way where I can use a debugger to see the value of a variable at each execution step?
Is there a way to see how much space in memory the value is taking up?
When would a person do an explicit conversion? If you know that you will need to do an explicit conversion, then why not declare the data types to be compatible in the first place?
May 20, 2019 at 6:09 pm
SSMS has a debugger built in, although running it remotely requires some configuration steps.
Not sure on how to see the space in memory a variable is taking up, I would assume that if it's an int, for example, it would take up 4 bytes.
A person would do an explicit conversion because they are just plain lazy or really do not understand how these things work. Yes, would would declare a compatible type.
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
May 21, 2019 at 3:22 am
"A person would do an explicit conversion because they are just plain lazy or really do not understand how these things work."
Did you mean to say implicit conversion? I would think that would be the lazy way since it happens automatically w/o typing code.
May 21, 2019 at 2:38 pm
I have to use explicit conversions because I want to embed a date in a string as output, or do comparisons on dates stored as text in a schema that is outside my control (so can't change to store as date/datetime). Explicit conversion != lazy, tyvm
-------------------------------------------------------------------------------------------------------------------------------------
Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses
May 21, 2019 at 2:52 pm
"A person would do an explicit conversion because they are just plain lazy or really do not understand how these things work." Did you mean to say implicit conversion? I would think that would be the lazy way since it happens automatically w/o typing code.
Yes, my reading and writing are working faster than my brain.
Explicit conversions should be done when data needs to changed to another type.
For example, we have an ETL that transforms data that is stored as an nvarchar type, and convert it to an integer type.
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
May 22, 2019 at 4:14 am
Ok. Great. Thank you.
May 22, 2019 at 9:14 am
This was removed by the editor as SPAM
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply