Re: Informix SQL help
Posted in 2006
Topics: SQL Development & Query Writing
Here is a cool way that I remembered from another post: http://groups.google.com/group/comp.databases.informix/browse_frm/thread/ec26c8fe03b8a4c4/7083ad3000799a3b?q=bozon&rnum=33#7083ad3000799a3b Select multiset ( select item start_loc_code from routes ri where ri.movement_no = ro.movement_no --order by mvnt_on_trip_id ), count(*) from r_movements ro group by 1 ; I think that you can include the order by if you are running 10 UC3 but I am still waiting to download my copy of 10 UC3. One thing I am not sure of is wether unordered pairs will match up correctly. But it is an interesting way.
ooops, r_movements is a table that contains a distinct list of the movement_no