Showing posts with label similar. Show all posts
Showing posts with label similar. Show all posts

Wednesday, March 7, 2012

How to implement floating headers and/or columns

Hello,
I have read in a number of Powerpoint presentation from MS folks that we
have the ability to implement floating headers and/or column, similar to
freezing panes in Excel.
Could somebody please point me to the article/link that explains how to
implement this?
Thanks in advance for your help,
Ashok GThis is only available in SQL Reporting Services 2005.
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/5b282ff53c37b672/a5fcf4b22a3766f7?q=fixed+header&rnum=1#a5fcf4b22a3766f7
Andy Potter|||Thanks Andy. Appreciate your response. I was also looking for floating
columns. Please do let me know if youhave further information.
--
Thank you,
Ashok G
"Potter" wrote:
> This is only available in SQL Reporting Services 2005.
> http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/5b282ff53c37b672/a5fcf4b22a3766f7?q=fixed+header&rnum=1#a5fcf4b22a3766f7
> Andy Potter
>|||Does this work the same when a report renders to Excel?
I am wondering if this freezes the table header in Excel? so that it prints
out the table header row in every page in Excel and the table header stays
when the user scroll down to the bottom of the report.
Thanks!
"Potter" wrote:
> This is only available in SQL Reporting Services 2005.
> http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/5b282ff53c37b672/a5fcf4b22a3766f7?q=fixed+header&rnum=1#a5fcf4b22a3766f7
> Andy Potter
>

Sunday, February 19, 2012

How to I retrieve the first value from a table in T-SQL?

I want to do something similar to ExecuteScalar in ADO.net but instead in T-SQL.

Basically I want to do a query that will return the first value in the table queried and put it into a variable. How do I do this?

Thanks in advance.

SELECT

top 1 yourCol

FROM

T1

ORDER

BYyourCol|||Well that returns a table with the first record BUT I wanted the thing returned as a value.

Say I declared a integer variable with

DECLARE @.x, I wanted the integer variable to be equal to the first record which would be an "age" column in the recordset

SELECT age FROM PEOPLE

I can't do @.x=SELECT age FROM people|||

CREATE

PROCEDURE [dbo].[sp__top1Name]

@.myAge

intOUTPUTAS

BEGIN

SET @.myAge=(SELECTtop 1 Agefrom T1ORDERBY Age)

END

In your code, you need to grab this value from stored procedure OUTPUT parameter which is the age you are looking for.