Forum Moderators: coopster
Ook, i am still in the early stages of my new Project and run into a bit of problem. How does one go about displaying results from 2 tables as one. The 2 tables have identical sturcture except the price value, one is in CDN and the other is in US $. I would like the results from the two tables be displayed as one and ordered according to the price, i do realize i might have to convert the CDN into US and Vice Versa,...Oh..just remebered does anyone know where i could dynamically get the currency rates? thanks
select u.ItemName, u.ItemPrice as USPrice, c.ItemPrice as CanadianPrice from USItems u left join CanadianItems c on u.ItemID = c.ItemID; Which should yield results:
ItemName: Red Cog
USPrice: 5.00
CanadianPrice: 9.95 This will only pick items that have the same ItemID. If you want to base it on the Name, change the join condition to:
u.ItemName = c.ItemName However, joining on IDs is ideal. If the two tables are identical as you say, the IDs should be the same.
Hope this helps!