Hi friends... I event don't know the name of what I am trying to do to google it.. I'm using sql2008 and here's the problem: 3 tables must be come together to form the table I wrote below.. SOURCE TABLES:
Productstable ---------------- beer keyboard chair SalesPointstable ------------------ newyork berlin moscov zurich SalesPricesTable -------------------------------- beer..........newyork..4..USD beer..........berlin...5..EURO beer..........moscov...6..ROUBLE beer..........zurich...7..FRANK keyboard......newyork..6..USD keyboard......berlin...7..EURO keyboard......moscov...8..ROUBLE keyboard......zurich...7..FRANK chair.........newyork..6..USD chair.........berlin...7..EURO chair.........moscov...8..ROUBLE chair.........zurich...6..FRANK
I need this result table:
................newyork....berlin...moscov....zurich beer........4.USD....5.EURO..6.ROUBLE...7.FRANK keyboard....6.USD....7.EURO..8.ROUBLE...7.FRANK chair.......6.USD....7.EURO..8.ROUBLE...6.FRANK
what can be the query ? I could not do it with pivot commands nor I could not designed this query.
any idea would be great. best regards. (sorry for formatting, editor didn't let me do everything)