Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago

Transform data from a table with subtasks to a new task table

I have the following data structure:

Id  ProjName

1   Proj1

2   Proj2

3   Proj3

 

And subtask info:

id ProjId TaskName

1 1          Task1

2 1          Task2

3 2          Task3

4 3          Task4

5 3          Task5

6 3          Task6

7 2          Task7

 

But I need to breakdown the Projects Table into something like:

Id  ProjName

1   Proj1

2   Proj2

3   Proj3

4   Proj4

5   Proj5

 

And to point Task5 to Proj4 and Task6 to Proj5 maintaining the rest without changes. What type of Query Can I make? I'm completly newbie at R.

 

Thanks

 

 

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      vanessafvgThanks for the info.

       

      The problem in my case is the data model which I can not change. So I need to change it when importing the tables. I was assuming that when I do an Advance Query the language is R. Is this incorrect?

      • Anonymous's avatar
        Anonymous
        Not applicable

        I mixed the letter.. M Language, not R.