function left

Danilo Rodrigues da Silva shared this question 1 year ago
Answered

what function to obtain the following result in a SITE = 1059-GEOTI ----> SITE = 1059

Comments (2)

photo
1

Hi Danilo,

Thank you for reaching out. If what you're saying is that you want to make 1059-GEOTI display as 1059, you can create a Calculated Field by clicking the "+" at the bottom of the page and creating a Simple SQL query. Here's an example:

/wF8uHo1CfsORgAAAABJRU5ErkJggg==

If you only have a few rows that need changing in this manner, you can just combine more WHEN/THEN statements.

If you need to do this for many rows, your best bet would be to draft some sort of free-hand SQL statement where you can select to only display values that appear after a certain character. Some seemingly good information on how you can accomplish this can be found here. This is assuming all your number values are four characters. You can also reference this for tips on how to CAST only integers from nvarchar data, for example. If you're not using SQL Server, you can search these concepts as they relate to your RDBMS.

Hope this helps.

Regards,

Mike

photo
1

Hi Danilo,

I'm going to go ahead and mark this one as Answered, but if you have further questions or concerns on this, if you respond, it will re-open the case and put it back in my queue and I'll be happy to help.

Regards,

Mike