Tagged with join - Visokio Forums http://forums.visokio.com/discussions/tagged/join/feed.rss Mon, 30 Oct 17 21:29:35 -0400 Tagged with join - Visokio Forums en-CA Merge/Join: Multi-joins for three flat files? http://forums.visokio.com/discussion/1884/mergejoin-multi-joins-for-three-flat-filess Tue, 06 Nov 2012 05:30:22 -0500 kattasureshkumar 1884@/discussions Omniscope Version : 2.8-alpha b329 (Oct 5, 2012 11:08:02 PM) r72129
Licensed Version : Till Mar 9, 2013 2:02:41 PM IST

We have two flat files and need to join these two flat files to generate the data.
Listed below the tables and their corresponding columns.
SITES - Siteid, Sitename
TRANSPORT - Sourceid, Destinationid, Quantity , Weight

So the requirement is if we join sites.siteid with transport.sourceid, then we get the Source Name
Then if we join sites.siteid with transport.destinationid , then we get the Destination Name.

Please help me in creating the same in Omniscope file by using the 'Merge/Join' Operation.

If we had considering these flat files as tables and written the join condition, the query looks as mentioned below.
SELECT so.siteid sourceid
, so.sitename sourcename
, de.siteid descid
, de.sitename descname, t.qty, t.weight
FROM temp_sites so
, temp_transport t
, temp_sites de
WHERE de.siteid = t.descid
AND so.siteid = t.sourceid

So now we need to create an iok file based on this query.

Please let me know how to create this step.]]>