Yesterday I was trying to get a part of a string from a field where the first comma occurs.
For example there is a field named 'Descriptor' which is a combination of "full name, Date of birth, unique number of the record" in that order. I wanted to get the full name using a select statement.
Here is the syntax I used.
select substring(descriptor,1,charindex(',', descriptor)-1) as [fullname]
from contacts
Subscribe to:
Post Comments (Atom)
Navigating the Data Science Seas: A Journey with Microsoft Fabric
Data science is a vast and exciting field, brimming with the potential to unlock valuable insights. But like any seafaring voyage, navigatin...
-
From the past 3 days I have been working on resolving merged and hidden cells issues when an SSRS reports is exported to excel. ...
-
I was trying to build an SSIS package that one of my colleagues has created. The first error that was thrown was as below: Exception des...
-
Today I was trying Node.js to connect to SQL Server, the connection to the sql server failed with the below error. name: 'ConnectionE...
No comments:
Post a Comment