Informix Problem
Posted in 2000
Topics: SQL Development & Query Writing, Stored Procedures & SPL
I created a view joining 2 tables. The problem is i need to generate a unique integer id for each record in the view. There is no way that I can extract it from the two tables. Also using ROWIDs won't solve the problem since there is a possibility that rowids of the two tables might conflict. Is there a way to generate a unique ID? Any SPL similar to oracles rownum? Thanks Sent via Deja.com http://www.deja.com/ Before you buy.
All entities should have a primary key, therefore your two tables should each have primary keys. If you must generate a unique ID for the view then a way to do this would be to combine the primary keys from the two tables is some way that will form a unique identifier. This should not be too difficult to generate as a column in the view. HTH Brett Randall Norman Erickson Lugtu wrote: > I created a view joining 2 tables. The problem is i need to generate a > unique integer id for each record in the view. There is no way that I > can extract it from the two tables. Also using ROWIDs won't solve the > problem since there is a possibility that rowids of the two tables > might conflict. Is there a way to generate a unique ID? Any SPL similar > to oracles rownum? > > Thanks > > Sent via Deja.com http://www.deja.com/ > Before you buy.