Jump to content

Is there an easy way to implement a UNION using hold files ...


Larry Loncar

Recommended Posts

I am not sure how to perform those options using IA, but I think that you could use either the MORE or MATCH feature.

If you have two identical files with same structure, fields name & format, the MORE feature is similar to a SQL UNION.

MATCH feature is giving you more flexibility regarding file/fields format

Here a quick sample using MORE

TABLE FILE CAR

SUM SALES AS 'MEAS'

BY COUNTRY/A10 AS 'DIM'

WHERE COUNTRY EQ 'ENGLAND';

ON TABLE HOLD AS FILE1

END

-RUN

 

TABLE FILE CAR

SUM SALES AS 'MEAS'

BY CAR/A10 AS 'DIM'

WHERE COUNTRY NE 'ENGLAND';

ON TABLE HOLD AS FILE2

END

-RUN

 

TABLE FILE FILE1

SUM MEAS

BY DIM

MORE

FILE FILE2

END

-RUN

Sample for MATCH

TABLE FILE CAR

SUM SALES

BY COUNTRY

ON TABLE HOLD AS FILE1

END

-RUN

 

TABLE FILE CAR

SUM RETAIL

BY COUNTRY

BY CAR

WHERE COUNTRY EQ 'ENGLAND';

ON TABLE HOLD AS FILE2

END

-RUN

 

MATCH FILE FILE1

SUM SALES

BY COUNTRY

RUN

FILE FILE2

SUM RETAIL

BY COUNTRY

BY CAR

AFTER MATCH HOLD AS MRGDATA OLD-OR-NEW

END

-RUN

 

TABLE FILE MRGDATA

PRINT *

END

-RUN

Link to comment
Share on other sites

Is there an easy way to implement a UNION using hold files For example, I am attempting to create a single report that captures individuals from two separate data sources. When I attempt to do a join between the two hold files, it appears to be running a left inner join instead of a left outer join.

I am using InfoAssist version 8207.23

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...