web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

SQL code to remove characters

(0) ShareShare
ReportReport
Posted on by

I am trying to make the computed col. in view , column should return strRem kind of thing suppose I want to remove ## from a field value of the same column , can any one suggest what SQL statement I suppose to write I wrote this expression:

expression = "StrRem("+ SysComputedColumn::returnField(_viewName,_DataSourceParty,_DataSourcePartyField) + ",'//')"

but it giving error while doing sync on view

 

any suggestion ?

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    Do you mean all # characters anywhere in the string, or just at a certain positon, or just if it's a pair of # characters, or what exactly?

    Obviously strRem() isn't a valid T-SQL command.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Try using Transact-SQL syntax in the expression, that can be interpreted for Views most likely:

    stackoverflow.com/.../remove-certain-characters-from-a-string

  • Suggested answer
    Brian Kinser Profile Picture
    815 on at

    please describe usage scenarios....if this is for display only I would create a display method that takes the value and massages it to show you appropriate text. If the data is bad and you actually need to cleanse it, I would write a x++ job that loops through all records that have cleansing need, then modify the text and update the record.....pretty common path to clean up data after imports and I have used this approach often...please mark as answer if appropriate

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans