Home All Groups Group Topic Archive Search About

Changing table value being field name

Author
3 Nov 2005 10:50 PM
Hendrick
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

Author
3 Nov 2005 8:04 AM
R.D
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


Show quote
"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
>
>
>
Author
4 Nov 2005 3:28 AM
Hendrick
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

Show quote
"R.D" <R*@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:
>
> > 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
> >
> >
> >
Author
3 Nov 2005 1:40 PM
David Portas
> 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
--
Author
3 Nov 2005 2:00 PM
Raymond D'Anjou
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.

Show quote
"Hendrick" <hbo***@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
>
>
Author
4 Nov 2005 2:57 PM
Hendrick
It's the time zone.
Thanks

Show quote
"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" <hbo***@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
> >
> >
>
>
Author
3 Nov 2005 3:16 PM
Hendrick
Hmmm, and now one day ahead. Fixed.

Show quote
"Hendrick" <hbo***@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...
> > 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" <hbo***@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
> > >
> > >
> >
> >
>
>

AddThis Social Bookmark Button