Hi All,
I am using Sybase 12.5.0.3
There are two tables say table1 and table2 having one to many relationship
table1
(
Key1
Key2
Key3
data1
data2
)
table 2
(
UKey1
UKey2
Key1
Key2
Key3
New_data1
New_data2
)
table1 and table2 can be joined using Key1,Key2,Key3 columns. According to the data model and business logic,for each row of table1 there will be 4 rows in table2. For a simmilar combination of Key1,Key2,Key3 columns in table2 there will 4 different New_data1 returned.
I need to write a query or a stored procedure to select New_data1
from table2 with a join on table1.
As per the data model and the business logic 4 rows will be returned by the query. The New_data1 values returned by the 4 rows should be captured in 4 columns.
I thought of using rowid concept but the version I am using doesn't support it.
Can anyone suggest me any alternative approach
Thanks & Regards
Shayantan Gupta