>Hi!
>
>We are in the process of creating a new Application which has quite a few calculated columns. The App will be Windows based and will use SQL 2005 as the database.
>
>The application's UI will be like a spreadsheet (Grid based) and will also have lots of Reports (pre built and user defined) which need to use those calc columns.
>
>SQL 2005 has the ability to create calculated columns so my question is how should we go about this.
>
>1] Define all the calc cols in the DB and have the BO's, UI and Reports treat them like regular cols.
>
>2] No calc cols in the DB and all the calc done by the BO's if so then what happens to (user defined) reports etc.
>
>3] Some other combination.
>
>Thanks
>
>Sarosh
Sarosh,
IMHO all are valid with 1st has advantage in reports. Other options like SQL2005's user defined types,CTE functions,pivot/unpivot,apply,StoredProcs etc exist. Really depends on your specific needs. Check user defined types anyway. They're powerfull in SQL2005 (codable in C# to have methods. ie: myType.convertToMetrics(),myType.ToString() etc so they even have advantage to format on the fly).
Cetin