Re: view with auto_increment field
- From: "Tom Moreau" <tom@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Dec 2005 08:53:46 -0500
@@ROWCOUNT is inappropriate here. Is it that you want a sequential number
or one that is truly unique?
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada tom@xxxxxxx
www.pinpub.com
"cmm" <cmourik@xxxxxxxxxxx> wrote in message
news:1135691191.311510.143250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am trying to create a view in MSSQL that has a column which is an
auto increment (or unique id) field but it doesn't work the way I want
it. Does anybody have an idea how to do this? The example below gives
me only 0 in the id field.
CREATE VIEW dbo.tree_x_categories
AS
SELECT @@ROWCOUNTas id, *
FROM <dbname>.dbo.tree_x_categories
GO
What I want is the fields from the table tree_x_categories plus an
additional field that has a unique identifier.
Many thnx,
Chris
.
- References:
- view with auto_increment field
- From: cmm
- view with auto_increment field
- Prev by Date: view with auto_increment field
- Next by Date: Re: view with auto_increment field
- Previous by thread: view with auto_increment field
- Next by thread: Re: view with auto_increment field
- Index(es):
Relevant Pages
|
|