Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Comparing Columns

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-01-09 : 11:15:17
Glen writes "Hi
I have some information in the form of Lottery numbers that have been ordered by the way they were drawn. I use this to perform some analysis but I would like to be able to order the balls by value of the drawn number so that I can get the Fibonacci numbers. Also is there a way that I can return the number count (appearance number) of each number.

At the moment I am using a trigger that inserts into another table (table 2) when the result one is updated. I then use a Select Count(number) on the table and group by the number



Table 1
*****************************************

       
1 2000/05/16 34 23 7 11 18 39
2 2000/05/23 6 49 25 1 27 19
3 2000/05/30 48 16 17 11 34 45


*****************************************
Table 2

   
1 2000/05/16 34
2 2000/05/16 23
3 2000/05/16 7
4 2000/05/16 11
5 2000/05/16 18
6 2000/05/16 39

***************************************

Is this a silly way to go about this?

Thanks"
   

- Advertisement -