[Urgent] :positioning the results in 7 columns

  • HI can any one  help .The senario is some how like  jawad's question, already raised in forum.  

    Tab1

    Col_Item varchar(20),

    Col_Shop varchar(20),

    Col_Rate real

    Many shops sales several items at different rate.

    I wish to have 3 most min rate shop names with rates against every item.

    Current Statues

    Col_Item || Col_Shop || Col_Rate

    Item1 || Shop1  || 1.2

    Item1 || Shop2 || 2.0

    Item1 || Shop3 || 3.0

    Item1 || Shop4 || 3.2

    Item2 || Shop1  || 3.0

    Item2 || Shop2 || 3.3

    Item2 || Shop3 || 2.5

    Item2 || Shop4 || 2.9

    Required Outcome (In 7 Columns)

    Col_Item || MinShop1 || MinRate1 || MinShop2 || MinRate2 || MinShop3 || MinRate3

    Item1 || Shop1 || 1.2 || Shop2 || 2.0 || Shop3 || 3.0

    Item2 || Shop3 || 2.5 || Shop4 || 2.9 || Shop1 || 3.0

    looking 4 yours reply desparetly

  • http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=65115

    Ryan Randall

    Solutions are easy. Understanding the problem, now, that's the hard part.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply