Kirix Support Forums

Calculated Fields in Queries vs Tables

Please post any help questions, requests or other feedback here.

Calculated Fields in Queries vs Tables

Postby deuteron on Wed Feb 16, 2011 5:19 pm

I only downloaded yesterday, and have been very impressed thus far.

I searched to find out why my Calculated Fields won't save in the queries I make - and no luck.

I understand if you type in 80 characters or less into the Input Formula, that becomes part of the query. Nearly all of my formulas are longer than 80 characters. Here is a simple one I label PlanYear. If a plan year begins in a month other than January (1st is implied), then the plan year ends in the following calendar year and that is the Plan Year.
iif(incmon >1 AND month(ibeeff)<= 12 and incmon <= month(ibeeff),year(ibeeff)+1,year(ibeeff)).

I have sucessfully ODBC connected to our production server, and have created a query that combines all the necessary fields from 3 ODBC tables, and 3 Excel sheets that contain info like 'incmon' above. If I try to enter the above formula as a Calculated Field - it works until I close the query. When I reopen, it is magically missing.

The above is too long to make into an Input Formula.

My work around was to create a table from the ODBC query. I created and saved all my formulas in that table. Everything was great until I had to go back and add another field from the ODBC query. I copied my 1st table, and used my original but modified ODBC query to re-make my 1st table. Now I can't get my 20+ formulas into the newly created table from my 1st table.

I know I am doing something wrong....

Is there a way to:
Get long formulas into a query - and have them stay there?
Copy formulas between tables easily?

I have no experience with C++ and only casually use VBA so if there is a code solution - I'll need infinite help.

Registered User
Posts: 1
Joined: Wed Feb 16, 2011 4:36 pm

Re: Calculated Fields in Queries vs Tables

Postby Aaron on Thu Feb 17, 2011 11:51 am

Wow, you're doing some fairly advanced stuff for having just starting using the package. Let me see if I can find out a little more about what's happening.
Aaron Williams
Kirix Support Team
User avatar
Kirix Support Team
Posts: 120
Joined: Fri Dec 16, 2005 3:01 pm

Return to Strata Help & Feedback