September 27, 2007 at 9:11 am
Hi,
I have a view which has no unique ID but I need one. The data does not present any data that can be used for a unique id.
Any ideas?
Thanks for the help.
Bill
September 27, 2007 at 11:43 pm
Do you always need a unique value or just for certain situations? Short term you could possibly use a temp table in lieu of the view. Or how bout creating a single column table that contains unique values. Then add that column to the view.
September 28, 2007 at 12:24 am
How to use a temp table in a view?
September 28, 2007 at 1:37 am
You can add column with a unique combination of the existing columns or you can use newid() function to have a 25 characters long unique value..
--Ramesh
September 28, 2007 at 9:30 am
Thank you all for the replies.
Situation resolved.
I was able combine two int fields cast as varchar then cast again as int to use as the unique id.
Bill
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply