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
 Transact-SQL (2000)
 Sequnce No Between 15, 16 and 17

Author  Topic 

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2006-07-21 : 05:07:42
Hi, all

I Want to generate the numbers 15,16 and 17
randomly

like
15
17
16

or
15
16
17

or
17
15
16
........like that. is it possible..?

Thanks
KK

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2006-07-21 : 05:15:25

select i from (select 15 as i union all select 16 union all select 17) a order by newid()


Ryan Randall
www.monsoonmalabar.com London-based IT consultancy

Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2006-07-21 : 05:28:45
Great
It's Working Fine

Thanks Ryan Randall
KK
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-07-21 : 11:38:07
Why do you want to generate only those numbers?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2006-07-22 : 07:07:31
quote:
Originally posted by madhivanan

Why do you want to generate only those numbers?

Madhivanan

Failing to plan is Planning to fail



In Our one of the client has do the overtime process
that shouldnot more than 15 , 16 or 17.that remaining hours sholud be shown into production hours .
that's Y
KK
Go to Top of Page
   

- Advertisement -