You are here: Re: Select several values into a single variable « MsSQL Server « IT news, forums, messages
Re: Select several values into a single variable

Posted by Alexander Kuznetsov on 10/02/96 11:47

> The results are random, based on the physical order of the data in storage.

The same is true about OLAP functions, the results are random, based on
the physical order of the data in storage:

create table t(i char(1), c char(1))
Table created

insert into t(i,c) values('1','A')
1 row inserted


insert into t(i,c) values('1','B')
1 row inserted


select i, c,row_number() over(order by i) rn from t
I C RN
- - ----------
1 A 1
1 B 2
2 rows selected


delete from t
2 rows deleted


insert into t(i,c) values('1','B')
1 row inserted


insert into t(i,c) values('1','A')
1 row inserted


select i, c,row_number() over(order by i) rn from t
I C RN
- - ----------
1 B 1
1 A 2
2 rows selected


drop table t
Table dropped

 

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

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