You are here: Re: Unique ID added to a result set « MsSQL Server « IT news, forums, messages
Re: Unique ID added to a result set

Posted by David Portas on 10/01/53 11:28

I would have to ask why you want to return the duplicate data in the
first place. I originally assumed that this was just for display on the
screen, in which case the client application is surely the best place
to solve the problem. Duplicate data in the database is bad news as I'm
sure you know and adding an arbitrary integer value obviously doesn't
solve the problem of redundancy, except maybe in the case of an
intermediate "staging" table. In a staging table you would probably
want to use IDENTITY to generate the row numbers and then filter the
result based on some logical key.

In SQL 2000 there is no generic method to generate row numbers in a
query. In SQL Server 2005 we have the ROW_NUMBER function to do this.

--
David Portas
SQL Server MVP
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация