August 31, 2012 at 4:27 am
Im haveing a lot of trouble writing a query. Ive been spinning my wheels for over an hour, and cant figure out what im not seeing.
Below is my data source. It is one table. Note each object has a distinct objectKey, but not a distinct ObjectID. I want to populate a column called "RootObjectKey. In this column i get the objectKey, based on the RootObjectID joining on the ObjectID (self join).
The problem is that i need it retruned in this format, total of 17 rows. When i self join the table on objectID = RootObjectID 18 rows as objectID is represented twice.
Has anyone any idea how i return the 16 columns, populated wihtthe correct ObjectKey in the RootObjectKey column?
I hope that is clear enough to understand. thanks for any help.
ObjectKeyObjectID RootObjectID RootObjectKey
111
221
331
441
551
661
771
881
999
101010
111111
121212
131313
141313
151515
August 31, 2012 at 4:42 am
Hey,
could you read this article[/url], then set-up the DDL and sample data in this format please? Then include the expected results based on your sample data.
Thanks 😀
August 31, 2012 at 5:19 am
Hi. Nevermind, i figured that what im trying to do is impossible and i need more info. i think some rows should be versioned, so i need to go to the source data to see if versioning column is available. thanks!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply