Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 22nd, 2005, 08:51 AM
csdstudent csdstudent is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 36 csdstudent User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 50 m 11 sec
Reputation Power: 5
Complex view

Hey everyone

I have the following tables

Attribute_Set
==========
Category_ID|| Attribute_ID || Attribute ||

1 1 Color
1 2 Condition
1 3 Shape

… … …



Data_Set
=========
Item_ID|| Attribute_ID || Data

131 1 Red
131 2 Broken
131 3 Cube
… … …


Now I want to create a view that creates columns from the Attribute_Set - Attribute value, to be more specific I need a view like this

Item_ID || Color || Condition || Shape || ….|| ……….

131 Red Broken Cube

…. …. …. …..


The view must create it’s columns from the Attribute_Set table, because new attributes may be added.

I have written a stored procedure that returns

Item_ID || Attribute || Data

131 Color Red

131 Condition Broken

……


How can I create the above described view?

Thanks for your time

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Complex view


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT