Thursday, March 22, 2012

Changing table value being field name

Deal all,
I have a table with values like :
ProductID ProductName ProductPrice
1 Product01 1000
2 Product02 1100
3 Product03 2100
4
5...
about 113 prodcut on line (could be around 150 in the future).
I want to make a report which needs data in a row like :
Product01 Product02 Product03 ... Product113
1000 1100 2100 .. the price of Product113
Could anybody tell me how to achieve this?
TIAHI
Read this.
But let front end do front end work
http://www.aspfaq.com/show.asp?id=2462
--
Regards
R.D
--Knowledge gets doubled when shared
"Hendrick" wrote:

> Deal all,
> I have a table with values like :
> ProductID ProductName ProductPrice
> 1 Product01 1000
> 2 Product02 1100
> 3 Product03 2100
> 4
> 5...
> about 113 prodcut on line (could be around 150 in the future).
> I want to make a report which needs data in a row like :
> Product01 Product02 Product03 ... Product113
> 1000 1100 2100 .. the price of Product113
> Could anybody tell me how to achieve this?
> TIA
>
>|||Thanks, it works as intended.. However, I thought there's a solution from
SQL languange without hardcoding the 'Q' part (which is ProductName in my
case). since it could be 150 rows :(
In access I could use TRANSFORM ... PIVOT, why this nice feature not
supported in SQL Server?, Even in SQL Server 2005 is not so matching this
PIVOT easiness. SQL compliance, I guess.
Thanks anyway.
Hendrik
"R.D" <RD@.discussions.microsoft.com> wrote in message
news:748C930B-EF50-4F48-BA2E-8C4E08C7604D@.microsoft.com...
> HI
> Read this.
> But let front end do front end work
> http://www.aspfaq.com/show.asp?id=2462
> --
> Regards
> R.D
> --Knowledge gets doubled when shared
>
> "Hendrick" wrote:
>
Product113|||> In access I could use TRANSFORM ... PIVOT, why this nice feature not
> supported in SQL Server?, Even in SQL Server 2005 is not so matching this
> PIVOT easiness.
Because the smart solution is to do it in your reporting app or
presentation tier, not in the database.
David Portas
SQL Server MVP
--|||Hi Hendrick,
Could you please check your system clock.
I have you 9 hours ahead of everybody else.
...or you may have set your time zone wrong.
"Hendrick" <hbouty@.not.gmail.com> wrote in message
news:%23W5M6tE4FHA.1420@.TK2MSFTNGP09.phx.gbl...
> Deal all,
> I have a table with values like :
> ProductID ProductName ProductPrice
> 1 Product01 1000
> 2 Product02 1100
> 3 Product03 2100
> 4
> 5...
> about 113 prodcut on line (could be around 150 in the future).
> I want to make a report which needs data in a row like :
> Product01 Product02 Product03 ... Product113
> 1000 1100 2100 .. the price of Product113
> Could anybody tell me how to achieve this?
> TIA
>|||It's the time zone.
Thanks
"Raymond D'Anjou" <rdanjou@.canatradeNOSPAM.com> wrote in message
news:ersbj7H4FHA.3592@.TK2MSFTNGP12.phx.gbl...
> Hi Hendrick,
> Could you please check your system clock.
> I have you 9 hours ahead of everybody else.
> ...or you may have set your time zone wrong.
> "Hendrick" <hbouty@.not.gmail.com> wrote in message
> news:%23W5M6tE4FHA.1420@.TK2MSFTNGP09.phx.gbl...
Product113
>|||Hmmm, and now one day ahead. Fixed.
"Hendrick" <hbouty@.not.gmail.com> wrote in message
news:#xafTcI4FHA.3636@.TK2MSFTNGP09.phx.gbl...
> It's the time zone.
> Thanks
> "Raymond D'Anjou" <rdanjou@.canatradeNOSPAM.com> wrote in message
> news:ersbj7H4FHA.3592@.TK2MSFTNGP12.phx.gbl...
> Product113
>

No comments:

Post a Comment