View Complete Post
I want be able to show only the 1st 5 rows of a report. I've tried the Top N operator, but when there is a tie for the 'Nth' value, then there can be greater than 5 rows. I want only the 1st 5 rows regardless of a tie.
Note: I'm using parameters in the report, so putting ROWCOUNT in the DataSet Query is not an option because it depends on which parameters are selected.
This must be a simple one and I am just having a blockI have two tables, Personnel and working details. I want to show all staff working in a single building but only the working details for a specific weekI have added a join which should list all staff but won't because of the date filter in the working detail table it returns only an exact match, I have added ' or is null' for the date filters but just returns all staff from all buildings
SELECT .cTblPersonnel.Firstn, .cTblPersonnel.Surname, .cTblWagesFcst.StartDate FROM .cTblWagesFcst RIGHT OUTER JOIN .cTblPersonnel ON .cTblWagesFcst.PersonnelID = .cTblPersonnel.PersonnelID WHERE (.cTblPersonnel.UnitID =544)
Exec ('SELECT * FROM filename') at TST_IBMDASQL
The above SQL statement using Linked Server IBMDASQL, does not show rows it only show the following message:
(1 row(s) affected)
And then if I run the statement, Exec ('SELECT * FROM filename') at TST_IBMDASQL, twice quickly i get the above message then on the second
run i get the message:
OLE DB provider "IBMDASQL" for linked server "TST_IBMDASQL" returned message "SQL0519: Prepared statement S000001 in use.
Cause . . . . . : The application program has attempted to prepare statement S000001. This statement is the SELECT statement for cursor C000001 that is currently open. Recovery . . . : Change the statement name in the PREPARE statement or correct the logic
of the application program so that it closes cursor C000001 before attempting the PREPARE statement again.".
Msg 7215, Level 17, State 1, Line 1
Could not execute statement on remote server 'TST_IBMDASQL'.
this mdx script should return asset value for the individual years but instead it return one line with a value.
When i use the browser in ssas and select the year in rows and measure, it gives the result back as expected ie. years in the rows and values.
Can you help me out please im stuck here:
[Measures].[Appraisal Forecasted Value] ON COLUMNS,
[Asset Value Date].[Year] ON ROWS
// Appraisal Forecasted Value
//All 1,931,290,000 I miss the Years on rows?
// This is from the browser which is correct because the year is added
Year Appraisal Forecasted Value