January 13, 2009, 11:22 AM
kfr104Metrics and Stacking Like Variables
Hello;
I have done some research but was not able to find any info on this, and I have spent time in the application trying to make this work and was not successful. I have joined two databases that have the same information. I am trying to count customer ID numbers from each database and stack them on top of each other under an across value that breaks the customer ID numbers out by type. This should be an easy function, but I just cannot figure out how to make it work.
Thanks...
January 13, 2009, 02:38 PM
Martha FournierIt sounds to me like you are trying to concatinate data from two tables. To do this you can use the 'USE' command.
The structure, SEGNAME, LOCATION, and segment sizes must all be identical.
It will use the FIELDNAMES from the first mfd, (AS filename).
USE
fname1 AS FNAME1
fname2 AS FNAME1
END
January 13, 2009, 03:25 PM
kfr104Would it be like this?
JOIN
ACTIVES_V.ACTIVES_V.AGENCYID IN ACTIVES_V TO MULTIPLE
AGENCY_V.AGENCY_V.AGENCYID IN AGENCY_V AS J1
END
USE
AGENCYID1 AS ACTIVES_V
AGENCYID2 AS ACTIVES_V
END
January 14, 2009, 03:08 AM
<JG>quote:
To do this you can use the 'USE' command.
USE applies ONLY to FOCUS and XFOCUS databases.
The simple way.
FILEDEF HOLD DISK HOLD.FTM (APPEND
-RUN
TABLE FILE CAR
COUNT CAR
COMPUTE SOURCE/A10='TABLE 1';
BY COUNTRY
ON TABLE HOLD FORMAT ALPHA
END
-RUN
TABLE FILE CAR
COUNT MODEL
COMPUTE SOURCE/A10='TABLE 2';
BY COUNTRY
ON TABLE HOLD FORMAT ALPHA
END
-RUN
TABLE FILE HOLD
SUM E02
ACROSS COUNTRY
BY SOURCE
END
January 14, 2009, 11:05 AM
j.grossIf the ACROSS variable is to identify the source table -- define a SOURCE variable in each table, and use MORE:
define file one
src/a3='one';
end
define file two
src/a3='two';
end
table file one
sum ...
by ...
across [or by] src
where ...
[on table hold ...]
MORE
file two
where ...
END
[Use the bracked alternative if you want to hold the data for further manipulation before generating the report.]