all groups > sql server data warehouse > february 2004 >
You're in the

sql server data warehouse

group:

Line Numbers in SQL


Line Numbers in SQL Scott Meddows
2/12/2004 2:50:40 PM
sql server data warehouse:
Is there a function I can put into my select clause that tell me what the
line number of the row is?

i.e. in Oracle you can do something like (Been a year since I've used
Oracle)

select rownum, Field1, Field2
from blah

Any help is appreciated. Thanks.

Re: Line Numbers in SQL Ray Higdon
2/12/2004 7:37:49 PM
No, you could do something with a temp table and IDENTITY. I believe Yukon
has the rownumber function. What do you need it for?

--
Ray Higdon MCSE, MCDBA, CCNA
---
[quoted text, click to view]

Re: Line Numbers in SQL Scott Meddows
2/12/2004 11:01:59 PM
It's the only way I can think of to alternate row colors in reporting
services....

[quoted text, click to view]

Re: Line Numbers in SQL Jean Philippe Vankemmel
2/16/2004 9:27:02 AM
you should have a look at the subject "row style in matrix" in
microsoft.public.sqlserver.reportingsvcs
Jean-Philippe.

"Scott Meddows" <scott_meddows_no_spm@tsged-removeme.com> a écrit dans le
message de news:eDztD6e8DHA.2404@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

Re: Line Numbers in SQL Scott Meddows
2/16/2004 11:08:52 AM
I don't seem to have a message with that title and the newsgroup is not in
Google groups yet...

[quoted text, click to view]

Re: Line Numbers in SQL Scott Meddows
2/16/2004 11:55:41 AM
Nothing there, either..

Doesn't come up in search.

[quoted text, click to view]

Re: Line Numbers in SQL Ray Higdon
2/16/2004 12:32:28 PM
See here - http://www.microsoft.com/sql/community/newsgroups/default.asp

--
Ray Higdon MCSE, MCDBA, CCNA
---
[quoted text, click to view]

Re: Line Numbers in SQL Ray Higdon
2/16/2004 1:10:06 PM
Nothing there? I just went to it, it's toward the bottom of the page, search
for "reporting services"

--
Ray Higdon MCSE, MCDBA, CCNA
---
[quoted text, click to view]

Re: Line Numbers in SQL Scott Meddows
2/16/2004 6:02:08 PM
you should have a look at the subject "row style in matrix" in
[quoted text, click to view]

That is what I'm looking up in that newsgroup. I can find the reporting
services newsgroup.

[quoted text, click to view]

Re: Line Numbers in SQL Ray Higdon
2/16/2004 7:21:30 PM
Ah, OK.

I use NNTP and searched and found it, this is the excerpt: (See below)






You will need to add an expression the outer most row grouping on the
matrix.
The attached sample report demonstrates how to do this.

Key Areas:

* Matrix Properties Dialog : Groups Tab : Country Group has an expression
on it
that controls the number of rows:
=System.Math.Ceiling(RowNumber(Nothing)/5)

* Place a PageBreakAtEnd on the Matrix Properties Dialog : Groups Tab :
Country Group.

NOTE: There is a bug on this dialog in RTM version. The checkboxes to
set
PageBreakAt[Start | End] are missing. You will need to hand edit the RDL
to get this
to work. Before proceeding backup your RDL. The code snippet shows where
the
PageBreakAtEnd tag was added to the RDL:

<Grouping Name="matrix1_Country">
<GroupExpressions>

<GroupExpression>=System.Math.Ceiling(RowNumber(Nothing)/5)</GroupExpression
[quoted text, click to view]
</GroupExpressions>
<PageBreakAtEnd>true</PageBreakAtEnd> <<<<<< Tag added
here.
</Grouping>

--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services

This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]




--
Ray Higdon MCSE, MCDBA, CCNA
---
[quoted text, click to view]

AddThis Social Bookmark Button