computed column, how to do?


Author
Message
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Trent,

I refer to a computed column with no agregate in the formula, but a calculation on other columns on the same line 

examples:
 cast (column_b*column_c/column_d) as Char(10))
 my_udf(column_x, column_y)

and I'll have use of these computed columns, with CLR functions in the definition... client application have no need to know anything about these functions, only the result as if it was a read-only column

If it is impossible today, I know that custom property on the BO is a workaround,  but how could I use DDT on an imported SQL database where already exist these computed columns?

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You will want to create a custom property within the BO in this case. In this example, the result set coming back should have the computed column, so you will want to create a custom property to expose this computed value.



When you refer to a computed column, how are you creating this value? Are you performing an aggregate type of command such as a SUM() or something along those lines? In either case, you will still need to create a custom property, but I wanted to make sure that I was sending you down the right path and wanted to make sure there were no other alternatives in this case.
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Hi,

  1. I need a computed column in a SQL server table. Is it possible to define it from within DDT?
  2. When I create it in SQLServer Management Studio, and import the database in DDT, I can't see that it is a computed column.


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search