I'm sure this is familiar to anyone having various health codes that have a mixture of alphanumeric characters.
For the simplest ones (skipping the ones that begin with "V"), I *thought* I was ok when converting the '001 - 999.99' range that is currently stored as a VARCHAR into an INT with a series of CASE statements for each grouping of ranges (although I realize these are actually decimal values but I haven't figured out how to add precision and scale in an applicable way)
CASE WHEN CAST(mcd.LINE_DIAG1 AS INT) BETWEEN 001 AND 139.99 --convert STRING TO INTEGER FOR EASIER SEARCHING
THEN 'Infectious and Parasitic Diseases'
But some of the data is not converting and I'm getting errors such as:
"Conversion failed when converting the varchar value '250.00' to data type int"
Maybe someone has been in this situation and could offer suggestions?
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data.
I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted? Many believe this is the case.
Let us try to examine for ourselves with an example.
To get started, use the following script, wh…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…