|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Cross tabcreate table task (taskID uniqueidentifier,taskname varchar(20)) create table tasktype (taskID uniqueidentifier,tasktypename varchar(20)) insert into task values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Documentation') insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Creation') insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','QA') insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Review') What I would like to output is: TaskName Tasklevel1 Tasklevel2 Tasklevel3 Documentation Creation Review QA Thanks! Ric Hi Ric
please post full DDL's of your tables -- Show quoteRegards Reg Besseling "Ric" wrote: > I have two tables: Task and TaskType. One Task always has three TaskTypes: > > create table task (taskID uniqueidentifier,taskname varchar(20)) > create table tasktype (taskID uniqueidentifier,tasktypename varchar(20)) > > insert into task values > ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Documentation') > insert into tasktype values > ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Creation') > insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','QA') > insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Review') > > What I would like to output is: > TaskName Tasklevel1 Tasklevel2 Tasklevel3 > Documentation Creation Review QA > > Thanks! > > Ric > Please note that these are just samples I created to simplify my issue. The
DDL you see in the create statements is all there is basically. Ric Show quote "Reg Besseling" wrote: > Hi Ric > > please post full DDL's of your tables > -- > Regards > > Reg Besseling > > > "Ric" wrote: > > > I have two tables: Task and TaskType. One Task always has three TaskTypes: > > > > create table task (taskID uniqueidentifier,taskname varchar(20)) > > create table tasktype (taskID uniqueidentifier,tasktypename varchar(20)) > > > > insert into task values > > ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Documentation') > > insert into tasktype values > > ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Creation') > > insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','QA') > > insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Review') > > > > What I would like to output is: > > TaskName Tasklevel1 Tasklevel2 Tasklevel3 > > Documentation Creation Review QA > > > > Thanks! > > > > Ric > > Ric
i asked for full ddl as i could not "see" a way to tell which of your 3 tasktypes should be labled as Level 1 ,2 or 3 -- Show quoteRegards Reg Besseling "Ric" wrote: > Please note that these are just samples I created to simplify my issue. The > DDL you see in the create statements is all there is basically. > > Ric > > "Reg Besseling" wrote: > > > Hi Ric > > > > please post full DDL's of your tables > > -- > > Regards > > > > Reg Besseling > > > > > > "Ric" wrote: > > > > > I have two tables: Task and TaskType. One Task always has three TaskTypes: > > > > > > create table task (taskID uniqueidentifier,taskname varchar(20)) > > > create table tasktype (taskID uniqueidentifier,tasktypename varchar(20)) > > > > > > insert into task values > > > ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Documentation') > > > insert into tasktype values > > > ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Creation') > > > insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','QA') > > > insert into tasktype values ('EC02ED43-265C-47BC-9575-4C62F55A24E3','Review') > > > > > > What I would like to output is: > > > TaskName Tasklevel1 Tasklevel2 Tasklevel3 > > > Documentation Creation Review QA > > > > > > Thanks! > > > > > > Ric > > > |
|||||||||||||||||||||||