开发者

Is it possible to make SQL Server convert entries columns in a set of results

I have the following setup...

Table: properties
p_id [pk]
p_propname
o_id_owners [fk]

Table: owners
o_id [pk]
o_extcode
o_fname
o_lname

Table: selectedfeatures
s_id [pk]
d_id_features [fk]
p_id_properties [fk]

Table: features
d_id [pk]
d_code
d_featurename
g_id_featuregroup [fk]

Table: featuregroup
g_id [pk]
g_featuregroupname

Ideally I want it to output

<header> Owner name | Owner Extcode | Prop name | [GROUP NAMES (featuregroup)] 
<row> Owner name | Owner Extcode | Prop name | ^feature code | ^feature code开发者_Python百科 | 

Its the group names bit I'm struggling with; The tables are linked and I can get the records to display thus:

<header> Owner name | Owner Extcode | Prop name | Feature Name
<row> Owner name | Owner Extcode | Prop name | Feature Name
<row> Owner name | Owner Extcode | Prop name | Feature Name


Have you seen this? Five methods converting rows to columns

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜