Skip to main content

Notifications

Community site session details

Community site session details

Session Id :

Work with computed columns on a view

Israel Gonzalez Profile Picture Israel Gonzalez 733

Example for computed column without SysComputedColumn class.

1. Create a new method on your view

computedColumn.jpg

2. Set the method as private static server.

 private static server str GetDayName()
 {   
     ;
     return 'DATENAME(WEEKDAY,T1.TRANSDATE)';
 }


In my example I'm adding a column to get the name of the day from a field of date type. You can do every SQL sentence. T1 represent the alias of the view.

3. Create a string computed column

computedColumn2.jpg

4. Go to properties of the new computed column created and set the view method

computedColumn3.jpg

Comments

*This post is locked for comments