Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 create view

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-07-07 : 06:21:33
bier writes "I have this table :



[Core_ID] [Type] [InnerColor] [OuterColor]
----------------------------------------------------------------------------
5151 ClassA turkois turk01
5151 ClassA brandy brand01
5151 ClassB turkois turk02
5151 ClassB brandy brand02
6060 ClassX blabla blabla8
6060 ClassX bobo bobo8
6060 ClassY blabla blabla9
6060 ClassY bobo bobo9



Now I want to query just Core_ID=5151 only, so that it'll look like this:


[InnerColor] [ClassA] [ClassB]
----------------------------------------------------
turkois turk01 turk02
brandy brand01 brand02



How do I do that?


<Oh.. I'm using Windows 98 SE, SQL Server 7>

Thanks a lot."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-07-07 : 06:24:58
You need a cross-tab:

http://weblogs.sqlteam.com/jeffs/archive/2005/05/02/4842.aspx
Go to Top of Page
   

- Advertisement -