Can some one help to convert rows into columns using recursive query concept in DB2?
Suppose I have DB2 table India_City with data as below:
City Name State
Mumbai Maharashtra
Pune Maharashtra
Bangalore Karanatka
Hubli Karanatka
Indore MP
Surat Gujrat
By using recursive query, I have to bring output as below:
Maharashtra Karanatka MP Gujrat
Mumbai -- -- --
Pune -- -- --
-- Bangalore -- --
-- Hubli -- --
-- -- Indore --
-- -- -- Surat
Thanks,
Sandip
CODE' d