Author |
Topic |
oracle_corrgi
Yak Posting Veteran
98 Posts |
Posted - 2007-10-09 : 05:44:04
|
hiif the column(status) any record is null then get top 'n' set rowcount 'nn' else get all the rowsthanxskrmm |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-10-09 : 05:51:46
|
[code]If Exists(select * from table where status is null)Select Top <n> * from TableElseSelect * from Table[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
oracle_corrgi
Yak Posting Veteran
98 Posts |
Posted - 2007-10-09 : 06:17:31
|
hii need to get only the records using set rowcountand i am getting records which are not null alsoi should use prockrmm |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-09 : 06:20:36
|
I think you should post proper and accurate sample data and expected output. E 12°55'05.25"N 56°04'39.16" |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-10-09 : 06:21:18
|
Why? what's wrong with TOP?If Exists(select * from table where status is null)BeginSet Rowcount <n>Select * from Table where status is NULLSet Rowcount 0EndElseSelect * from Table Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-09 : 07:25:03
|
quote: Originally posted by oracle_corrgi hii need to get only the records using set rowcountand i am getting records which are not null alsoi should use prockrmm
Are you SQL Server?MadhivananFailing to plan is Planning to fail |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-09 : 07:47:34
|
A better HAL? [:8]I think he is a man, not a machine. E 12°55'05.25"N 56°04'39.16" |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-09 : 08:35:41
|
quote: Originally posted by Peso A better HAL? [:8]I think he is a man, not a machine. E 12°55'05.25"N 56°04'39.16"
I think I dont understand what you said MadhivananFailing to plan is Planning to fail |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-10-09 : 09:33:59
|
Madhi,I think Peso means this http://en.wikipedia.org/wiki/HAL_9000 since you asked OP quote: Are you SQL Server?
KH[spoiler]Time is always against us[/spoiler] |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-10 : 02:25:55
|
quote: Originally posted by khtan Madhi,I think Peso means this http://en.wikipedia.org/wiki/HAL_9000 since you asked OP quote: Are you SQL Server?
KH[spoiler]Time is always against us[/spoiler]
Well. Thanks MadhivananFailing to plan is Planning to fail |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-10-10 : 02:45:26
|
my mind is going... I can feel it... elsasoft.org |
 |
|
X002548
Not Just a Number
15586 Posts |
|
|