Viewing 14 posts - 31 through 44 (of 44 total)
:w00t: Thank you guys this is what i needed. :w00t:
But i didnt got how case works in the above order by clause ?
June 24, 2009 at 6:14 am
Thanks a lot . i got it :w00t:
June 23, 2009 at 3:01 am
Hi,
And mm-dd-yyyy to dd-mm-yyyy?
June 23, 2009 at 2:44 am
Paul White (6/18/2009)
This should do the trick, I think:
-- This table specifies how many rows to return for each row_id in the data table
DECLARE @Top TABLE (row_id INT...
June 18, 2009 at 3:36 am
Dave Ballantyne (6/18/2009)
PS have u understood my problem?
I believe so , but i would encourage , and expect, you to understand the code and to ensure that the given solution...
June 18, 2009 at 3:30 am
Dave Ballantyne (6/18/2009)
Did you try my suggestion ?It gives you that...
:w00t:Hi,Dave Thanks it works as expected by me !! :w00t:
PS have u understood my problem?
Thanks again dave
June 18, 2009 at 2:59 am
Hi all,
here is sample data.
tbltop
-------------
id nid
1 2
2 3
tbldata
-------------
id data
1 a
1 b
1 c
1 d
1 e
1 f
1 g
1 h
2 a
2 b
2 c
2 d
2 e
i need top x rows from table tbldata for each...
June 18, 2009 at 2:40 am
Hi,
i need output in this form,
id data
1 a
1 b
2 a
2 b
2 c
top(2) for id=1
top(3) for id=2
June 18, 2009 at 1:32 am
Florian Reischl (6/17/2009)
I would avoid NOLOCK if...
June 17, 2009 at 4:04 am
GilaMonster (6/17/2009)
Just a couple things with that.It's likely to perform badly. Take a look at the blog post I referenced earlier. Also, before you use nolock, read this: http://sqlblog.com/blogs/andrew_kelly/archive/2009/04/10/how-dirty-are-your-reads.aspx
Hi Gila,
As...
June 17, 2009 at 1:29 am
:w00t: HI Thank you it worked !! :w00t:
June 16, 2009 at 11:35 pm
Hi dilip,
select * from Tname
where Tcol1 = case when @X is null then null
when @X = 0 then null
else @X end
and
Tcol2 = case when @Y is null then null
when...
June 16, 2009 at 11:10 pm
Thanks a lot Jack Corbett and Lynn Pettis its worked !!!
i used case with null.
Thanks again 🙂 🙂
June 4, 2009 at 8:36 pm
Hi and thanks for that, i havent tried , before that i have a doubt. Suppose i have a set which has all 0 like for example
Sell
----
0
0
0
and i...
June 4, 2009 at 10:23 am
Viewing 14 posts - 31 through 44 (of 44 total)