calculated-field

How can I set up a simple calculated field in SQL Server?

I have a table with several account fields like this: MAIN_ACCT GROUP_ACCT SUB_ACCT I often need to combine them like this: SELECT MAIN_ACCT+'-'+GROUP_ACCT+'-'+SUB_ACCT FROM ACCOUNT_TABLE I'd like a calculated field that automatically does this, so I can just say: SELECT ACCT_NUMBER FROM ACCOUNT_TABLE What is the best way to do ...

Reading DataSet structure without reading it's data.

Scenerio: I want to add a calculated field to given (any) dataset during runtime. I don't know any other way to obtain a dataset structure other than performing DataSet.Open method. But the Open method causes that atleast one row of a data needs to be transfered from server to client. Then I need to close the DataSet, add field and reo...

Stupid problem with Javascript calculations and postbacks

I'm working on an ASP.NET web app where I'm using a Wizard to take the client through a large series of steps. One of the steps includes calculating a bunch of numbers on the fly... the numbers calculate properly but when I click "next" and then go back again... some of the numbers are not retained. Here is the calculation function fu...

Adding a calculated field to a Query at run time.

I'm getting data using a query in Delphi, and would like to add a calculated field to the query before it runs. The calculated field is using values in code as well as the query so I can't just calculate it in SQL. I know I can attach an OnCalcFields Event to actually make the calculation, but the problem is after adding the calculated...

T-SQL Operations on a Calculated Date Field

Can I do WHERE operations on a calculated date field? I have a lookup field, which has been written badly in SQL and unfortunately I can't change it. But basically it stores dates as characters such as "July-2010" or "June-2009" (along with other non date data). I want to extract the dates first (which I did using a LIKE opertor) and th...

Can a SharePoint Calculated field check for existence of other columns?

I want to use OrderBy in SPSiteDataQuery to sort items by data, however, the field containing the date differs between the content types. Can this be solved by sorting with a calculated field? I am currently trying to create a calculated field that checks for existence of a field (using ISERROR), if it is found it returns the value, oth...

SQL Calculated Field

I'm creating a view as such: CREATE VIEW all AS SELECT m.id, m.title, m.description, m.date, m.views, r.rating, r.id FROM riv_montage m, riv_ratings r But I'd like to create a calculated field on each row that does something like: r.rating/COUNT(r.id) Is there any way to do this? ...

Sql Analysis Services Current Date

I need to perform a calculation in SSAS which only applies to the current and future months (it can't be applied retrospectively using the available data). I can do this by using the calendar hierarchy and hard coding today's month as follows... SCOPE([Measures].[RollingStock]); ([Dim Date].[Calendar].[Month].&[201008]:NULL...

UpdateFields element does not work for Office 2003

I am using the updatefields element as stated here: http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.updatefieldsonopen.aspx When I open the document in word 2007/2010 I get prompted to update the fields, but this doesn't happen on Word 2003. My xml looks like this: <w:updateFields /> Any suggestions? ...