If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Need help to find an alternative for rowid concept in Sybase 12.5.0.3

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-01-08, 08:25
shayantangupta shayantangupta is offline
Registered User
 
Join Date: Apr 2008
Posts: 2
Post Need help to find an alternative for rowid concept in Sybase 12.5.0.3

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
Reply With Quote
  #2 (permalink)  
Old 04-01-08, 08:59
shayantangupta shayantangupta is offline
Registered User
 
Join Date: Apr 2008
Posts: 2
Sorry I forgot to add.
I thought of writing a view also where I can include 1 auto incrementor column and later query this view using this auto incremented value.
If anyone can help me out to find how to include an auto incrementor column.
Reply With Quote
  #3 (permalink)  
Old 04-04-08, 06:59
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
Maybe use an IDENTITY column
It contains system-generated values that uniquely identify each row in a table (can have gaps).
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On