I don't know if anyone has ever encountered this strange behaviour, it certainly sounds like like nonsense so am I missing something?
Here's the facts:
I am writing a query in ssms, reasonably complicated, with temp tables, linked servers and lots of lookup/transformation steps. When testing, I...
It sounds like there's some extra stuff in there somewhere.
Try creating a completely blank new report and then copying the relevant bits across. Only use a single table control on the report...
--------------------
Procrastinate Now!
If you have to use ssrs, then check the report to see if there are any other data or components.
The export functions try to mimic the actual report in layout, so if you have any extra data say like a header or something, then they may get exported.
Have you tried exporting to other formats to...
if you're just sending a csv out then do you really need to use SSRS?
From what you've described, it seems like a scheduled job running a t-sql script to do everything would be much more straight forward and give you more control over the csv output.
--------------------
Procrastinate Now!
just to answer your original question, there is a if / else syntax in t-sql, it would go something like:
if (@Parameter = 1)
begin
select something...
end
else if (@Parameter = 2)
begin
select something else...
end
else
begin
select everything else...
end
in your situation, it'd be...
I've got a mdx query that when run, is returning the all members of each hierarchy level.
how can I filter the "All" members out?
p.s.
The code is adapted from auto generated code, so any pointers for making it better would be appreciated as well
SELECT
{
[Measures].[Actual Sales]
...
Eureka!
I had to right click on the data field to create a static row, and then assign the measure values individually to each new row.
Was easier with no measures selected on the wizzard.
Thanks RiverGuy, got there in the end :)
--------------------
Procrastinate Now!
Hi RiverGuy
I've tried to click on the row or column to add new groups and it only allows me to add dynamic groups, there's no option to "split cells" or to even set up static groups.
I'm using SSRS 2005.
--------------------
Procrastinate Now!
Hi RiverGuy,
Sorry, I was a bit unclear in my original post.
I actually have multiple measures in the full mdx and would like the measures to be displayed per product, i.e.
Loc1 Loc2
Prod1 Sale 1.5 2.0
Qty 5 3
Prod2 Sale 2.7 1.4
Qty 1 2...
Hi RiverGuy,
Sorry for the late reply, have been a bit busy. Anyway...
Maybe this should be a SSRS question from now, but I've re-configured the measures to be on the columns and the dimensions on the rows, but in a matrix report, how do I actually get the measures to be displayed on the rows...
I have a standard mdx query, along the lines of:
select
crossjoin
(
Product.[Hierarchy]
, Measures.[Measure]
) on rows
, Location.Hierarchy
on columns
from
cube
however, I'm trying to use this as the source of a SSRS report and SSRS is trying to hard code all the...
use sys.sysprocesses, there's a sql_handle column in there which can be fed to sys.dm_exec_sql_text to get the full sql being run.
Note, the stmt_start and end columns will define the actual section of the sql that's being run, you need to divide these numbers by 2 though...
Firstly, you should use the new join syntax. i.e.
[code]
Delete t1
from dbo.tblTrackingTable t1 inner join
dbo.tblTrackingTable t2 on t1.BoxNumber = t2.BoxNumber And
t1.FileNumber = t2.FileNumber And
t1.TrackingDate = t2.TrackingDate And
Where
t1.Tracking_ID > t2.Tracking_ID...
one you your columns needs to be unique, so, just add a unique constraint (index) on one of them, preferably the parent...
Oh, just read your question more carefully, no pk AND no unique index...
Yeah, that will pose a problem then...
just wondering, why can't you add a unique index...
yeah, your best bet for doing this would be to use the row_number function and then use where to limit the results into pages...
--------------------
Procrastinate Now!
you can add a foreign key relationship between any column in any table, irrespective of whether it's a key or not, as long as the datatypes match.
Although you'll get problems if both the columns contain duplicates.
--------------------
Procrastinate Now!
I've not come across anything like this in ssrs2008 but I've not been using it that long, so may have just missed it.
however, you can probably replicate this behaviour by using report redirects, i.e. have your popup message as the report that's accessed by default, and have a link on that...
without reading through and understanding all your code, as a rule, don't use sub queries, they often kill performance.
essentially, you are running a query for every single record returned in your main query, so even if the sub query takes like 1 sec, if your main query returns 10k records...
dbo is short for database owner, giving users access to this schema allows then to do just about anything to your database...
--------------------
Procrastinate Now!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.