I want to get 100 rows from particular record and onward. in oracle i can use rownum and in mySql i have function limit ... i want to know what is the ms-sql alternate for it.
I want to get 100 rows onward to one particular data ... how can i ?This doesn't sound like a good idea... (using rownum)
Please enlighten me with the SQL you used in mySQL?
Also, what version of SQL Server are you using?|||SELECT TOP n
(Being deprecated for modification statements in SS 2008+)
SET ROWCOUNT = n
(SS 2005)
OVER () clause|||I want to get 100 rows from particular record and onward.
You need more than just TOP, don't you?
I don't like the use of rownum - I'm sure there's a better way to get what the OP wants!|||You need more than just TOP, don't you?yes, a WHERE condition, too
oh, and an ORDER BY clause, without which TOP is meaningless
:)|||I want to get 100 rows from particular record and onward. in oracle i can use rownum and in mySql i have function limit ... i want to know what is the ms-sql alternate for it.
I want to get 100 rows onward to one particular data ... how can i ?
ummmmmmmmmmmmmm
what particular row|||what particular rowthe one specified by the WHERE condition|||ummmmmmmmmmmmmm
what particular rowThat row, right there near the middle of my screen.
-PatP|||I'm feeling better now|||"Standard" for SQL 2005:
with cte
as
(select row_number () over (order by name) as num, object_id, name
from master.sys.tables)
select *
from cte
where num >= 4
Showing posts with label alternate. Show all posts
Showing posts with label alternate. Show all posts
Friday, March 30, 2012
Friday, March 23, 2012
Row selection
Hi,
Just curious, can the crystal report show (during report view and in the printed report) different background colour for alternate rows?
For example:
1 row background colour =silver
2 row background colour = yellow
3 row background colour = silver
and so on
thanksHi,
In the details background color write the formula
if recordnumber mod 2=1 then silver
else yellow
Madhivanan|||Thank You... :)
Anyway, is there any sites that I can refer to for this kind of code for crystal report?
Just curious, can the crystal report show (during report view and in the printed report) different background colour for alternate rows?
For example:
1 row background colour =silver
2 row background colour = yellow
3 row background colour = silver
and so on
thanksHi,
In the details background color write the formula
if recordnumber mod 2=1 then silver
else yellow
Madhivanan|||Thank You... :)
Anyway, is there any sites that I can refer to for this kind of code for crystal report?
Subscribe to:
Posts (Atom)