[Customers].[Area].[All].CHILDREN * [Time].[Month Full Name].[All].CHILDREN
ON ROWS
FROM [Sales And Margin Cube]
WHERE ( [Customers].[Customer Group].&[Specialty] )
All
All
All
All
Prod1
Prod1
Prod1
Prod1
Prod2
Prod2
Prod2
Prod2
Prod3
Prod3
Prod3
Prod3
Prod4
Prod4
Prod4
Prod4
Sold Amt USD
Sold Amt USD
Sold Qty
Sold Qty
Sold Amt USD
Sold Amt USD
Sold Qty
Sold Qty
Sold Amt USD
Sold Amt USD
Sold Qty
Sold Qty
Sold Amt USD
Sold Amt USD
Sold Qty
Sold Qty
Sold Amt USD
Sold Amt USD
Sold Qty
Sold Qty
Under sql 2000 I could connect to a server as a speciifc sql user. How can I emulate that under sql 2005 Query Editor. (It doesn't appear to let me define the user to log in as.)
Not exactly a TSQL question. Query Editor in Management Studio keeps reformatting my sql code every time I hit save, making the code much harder to read. Is there a way to preserve line breaks and indentation in the SQL when creating a view? Thanks.
In query editor I displayed a single row from a table. The row is so long that I need to scroll horizontally back and forth to check out it's fields. Using t-sql (or otherwise) can I display the row like this: (vertically)
I am currently using cascade parameters, in Manadgement Studio my filter queries takes about 1 sec to run, but in the report it takes forever for me to be able to choose them. Is there any way to optimize this?
I have been given a task to develop a SSRS report that Mimic's a ASP.net grid. this grid has four column headers such has
Measures Jan 2006 Feb 2006 Mar 2006 First "Measure" Column as all the measure captions as the data in rows and other 3 columns (Jan 2006,Feb 2006,Mar 2006 Dimensions) has the measure values as the data in the row.
Measure Jan 2006 Feb 2006 Mar 2006 Profit 12.32 15.23 15.0
Revenue 12.33 16.33 11.22
ROI 2 4 5
In SSRS MDX is not flexible as writing in Query Analyzer , can some one give me the idea how to create this in SSRS report designer.
I am newbie and i am working on SSRS to create some reports.
I have a reprot where i am displaying ProviderNos in the first column and based on provider i need to get some other information from another database and display it in the same line with Provider.
Below is my report format.
ProviderNo Speciality 1111111 A 2222222 B 3333333 C
The problem is, PrivderNos are from different database so i am getting it in separate Dataset. And Speciality is in Different Database so i am getting it in separate dataset. But i want both of them to be displayed in same table on report.
Below is the query for ProviderNos: Select Prv_No from server1.database1.dbo.Providers where MemberNo='xxxxxx'
Below is the quer for getting Speciality: Select Speciality from server2.database2.dbo.Prv_SP where prv_no IN (@prvno)
If i am assigning SpecialityDS to the table, it displays correct values for each n every provider. But i dont know how do i make it in such a way that it displays the result as above format.
I have created testreport.rdl using SQL Server 2012 SSRS. How to execute/call this through SQL query analyser, so that this will be executed and display output.
Im new to SSRS, basically I have created and deployed a report to my reporting server.
Now I have a query parameter on my report. From my application, I can access the report manager, and here it asks me for my variable. I'm not sure if my question is a vb.net one, but I was wondering if anyone knew how I could pass my query paramater to SSRS at runtime. Basically it would be easier for my users if they could just see the report they are interested in, rather than having to type the variable in to be able to see the report.
I am querying DB2 from SSRS. I get an interger back that represents a time like this: HHMMSS (The data type in DB2 is an integer.) I would like to make this representation of the time display a little more friendly. Does anyone have a good idea on how I can change the query or SSRS format to display semi-colons to break up the hours, minutes and seconds? Also, the other issue is that since I don't get leading zeros back....they probably need to be added to this value if the value is not a full 6 characters.
I have been assigned the task to port some reports from Business Objects 5.0 to Reporting Services 2005. The BO reports used data regions based on multiple datasets, which is not feasible in SSRS. So I have to get everything in one big query. The problem is that the query runs for 2 hours instead of a couple of minutes with our old BO solution which got it's data from an access database ! is there a better way to do this ?
here is the query
Code Snippet
ALTER PROCEDURE [dbo].[MERCKGEN_HDMCKQ02_DoctorBrickDoctorGroups_values] -- Add the parameters for the stored procedure here @TimePeriodDesc varchar(255), @TotalMarket varchar(255), @datasetname varchar(255), @VisibleProducts varchar(500), @DoctorSubTerritory varchar(255) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;
-- Insert statements for procedure here SELECT xpospecialty.specialtydesc, a.doctorsubterritory , a.doctorbrick , a.doctorgroup , xpomarket.productdesc , s.totalmarketrank , s.prod1ranktotal , s.prod2ranktotal , SUM ( CASE WHEN (xpotimeperiod.timeperioddesc = @TimePeriodDesc) THEN xpomeasures.rxvalues ELSE 0 END ) AS totalrxvalues, COUNT ( CASE WHEN (xpoproductsize.prodsizedesc <> 'Non -') AND (XpoMarketSize.MarketSizeDesc <> 'Non - MKT') AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) THEN 1 ELSE NULL END ) AS rxrcount, COUNT ( CASE WHEN (xpoproductsize.prodsizedesc = 'High') AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) THEN 1 ELSE NULL END ) AS [high], COUNT ( CASE WHEN (xpoproductsize.prodsizedesc = 'Medium') AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) THEN 1 ELSE NULL END ) AS [medium], COUNT ( CASE WHEN (xpoproductsize.prodsizedesc = 'Low') AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) THEN 1 ELSE NULL END ) AS [low], COUNT ( CASE WHEN (xpoproductsize.prodsizedesc = 'Very Low') AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) THEN 1 ELSE NULL END ) AS [very low], COUNT ( CASE WHEN (xpoproductsize.prodsizedesc = 'Very High') AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) THEN 1 ELSE NULL END ) AS [very high], (SELECT SUM(xpomeasures.rxvalues) AS totalrxvalues FROM dbo.xpotimeperiod INNER JOIN dbo.xpomeasures ON xpotimeperiod.timeperiodid = xpomeasures.timeperiodid INNER JOIN dbo.xpomarket ON xpomeasures.xpomarketid = xpomarket.xpomarketid INNER JOIN dbo.xpogeography ON xpomeasures.geographyid = xpogeography.geographyid WHERE (xpomarket.productdesc = @TotalMarket) AND (xpomeasures.datasetname = @DatasetName) AND (xpotimeperiod.datasetname = @DatasetName) AND (xpomarket.datasetname = @DatasetName) AND (xpogeography.datasetname = @DatasetName) AND (xpogeography.doctorgroup = a.doctorgroup) AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) ) AS rxvaluesdoctorgroup FROM dbo.xpotimeperiod INNER JOIN dbo.xpomeasures ON xpotimeperiod.timeperiodid = xpomeasures.timeperiodid INNER JOIN dbo.XpoMarketSize ON XpoMeasures.XpoMarketSizeId = XpoMarketSize.XpoMarketSizeId INNER JOIN dbo.xpoproductsize ON xpomeasures.xpoproductsizeid = xpoproductsize.xpoprodsizeid INNER JOIN dbo.xpomarket ON xpomeasures.xpomarketid = xpomarket.xpomarketid INNER JOIN dbo.xpogeography a ON xpomeasures.geographyid = a.geographyid INNER JOIN dbo.xpospecialty ON xpomeasures.xpospecialtyid = xpospecialty.xpospecialtyid INNER JOIN dbo.Fn_mvparamsorted (@VisibleProducts,',' ) ON xpomarket.productdesc = fn_mvparamsorted.parame LEFT JOIN ( SELECT xpogeography.doctorgroup, SUM(CASE WHEN xpomarket.productdesc = @TotalMarket THEN xpomeasures.rxvalues ELSE 0 END) AS totalrxvalues, ROW_NUMBER() OVER (ORDER BY ROUND(SUM(CASE WHEN xpomarket.productdesc = @TotalMarket THEN xpomeasures.rxvalues ELSE 0 END), 0) DESC) AS TotalMarketRank, ROW_NUMBER() OVER (ORDER BY ROUND(SUM(CASE WHEN xpomarket.productdesc = 'PPI Total' AND xpogeography.doctorsubterritory = @DoctorSubTerritory THEN xpomeasures.rxvalues ELSE 0 END), 0) DESC) AS 'Prod2RankTotal', ROW_NUMBER() OVER (ORDER BY ROUND(SUM(CASE WHEN xpomarket.productdesc = 'Merck-Generics Total' AND xpogeography.doctorsubterritory = @DoctorSubTerritory THEN xpomeasures.rxvalues ELSE 0 END), 0) DESC) AS 'Prod1RankTotal' FROM dbo.xpotimeperiod INNER JOIN dbo.xpomeasures ON xpotimeperiod.timeperiodid = xpomeasures.timeperiodid INNER JOIN dbo.xpomarket ON xpomeasures.xpomarketid = xpomarket.xpomarketid INNER JOIN dbo.xpogeography ON xpomeasures.geographyid = xpogeography.geographyid WHERE xpomeasures.datasetname = @DatasetName and (xpomarket.datasetname = @DatasetName) and (xpogeography.datasetname = @DatasetName)
AND xpotimeperiod.timeperioddesc = @TimePeriodDesc GROUP BY xpogeography.doctorgroup ) AS s ON s.doctorgroup = a.doctorgroup WHERE (xpomeasures.datasetname = @DatasetName) AND (xpomarketsize.datasetname = @DatasetName) AND (xpoproductsize.datasetname = @DatasetName) AND (xpotimeperiod.datasetname = @DatasetName) AND (a.datasetname = @DatasetName) AND (XpoMarket.datasetname = @DatasetName) AND (xpotimeperiod.timeperioddesc = @TimePeriodDesc) AND (a.doctorsubterritory = @DoctorSubTerritory) GROUP BY xpospecialty.specialtydesc, a.doctorsubterritory , a.doctorbrick , a.doctorgroup , fn_mvparamsorted.parame , fn_mvparamsorted.sortid , xpomarket.productdesc , s.totalmarketrank , s.prod1ranktotal , s.prod2ranktotal ORDER BY s.totalmarketrank, a.doctorgroup , fn_mvparamsorted.sortid END
So this has got to be considered a major, major flaw in how SSRS interacts with Oracle. I'm using the "Oracle" data provider, but I've also tried using Microsoft's OLE DB data source, and some others, and in no case does SSRS hand off to Oracle a query that does NOT have bind variables. In other words, typically query parameters get passed off to Oracle as bind variables.
The incredibly major problem that this causes is that it disallows Oracle's use of star transformation queries which is the primary method by which to get fast responses to a data warehouse/star schema, in fact a prime authority on this subject (Bert Scalzo, Oracle DBA Guide to Data Warehouse and Star Schemas, p.86 -- obvioulsy not using Oracle 7x was the first) lists it as in effect the #1 consideration.
So what gives? In effect SSRS cannot be used against large scale Oracle data warehouses? I've had success with Business Objects being able to access Oracle star transformations.
So a guess my question is how the heck can use SSRS in a big, Oracle-based data warehouse?
For star_transformation join plans, the following parameters must also be considered: ... No BIND VARIABLE in SELECT statement
http://www.orafaq.com/usenet/comp.databases.oracle.server/2003/09/28/2305.htm Star transformation is not supported for tables with any of the following characteristics: * Queries that contain bind variables
Im new to SSRS, basically I have created and deployed a report to my reporting server.
Now I have a query parameter on my report. From my application, I can access the report manager, and here it asks me for my variable. I'm not sure if my question is a vb.net one, but I was wondering if anyone knew how I could pass my query paramater to SSRS at runtime. Basically it would be easier for my users if they could just see the report they are interested in, rather than having to type the variable in to be able to see the report.
Hi! I like a new sql editor instead of the query analyzer. The QA dont show the outlining, bracket injuctions and intellilist. Help! Wich editor able this functions?
I have a question regarding how to use report prompts in SSRS reports that are based on SQL queries. When I added the prompt into the query for use as a filter value, it says that there is an error. It does not recognise the '!' inside the parameter prompt string. Example is parameter!month_prompt.Value, which the ! is not recognised.
When I use an SSAS cube in Excel the command text is just the name of the cube itself and does not require an MDX query. Is it possible in SSRS to avoid writing an MDX query?
I have one view, i written below query to get employee hierarchy based on orgid and employee name..
If i select employeename it shoukd show employee reporties(under employees and below employee reporties like tree structure)
It is running fast in SSMS Level, but it is taking more time in SSRS(Sql Sever Report Services), If i run this query in SSRS,Some times System not responding.
Declare @OrgId int Declare @EName varchar(30) Set @OrgId=56793 Set @EName='ABCD' Select EmpId
What do all of you use to create and edit stored procedures? I am looking for a better way to code than to use the default window supplied with Enterprise Manager.
Do most of you use the Query Analyzer? Are there third party products you like using better?
I'm wondering if there's a better SQL Editor than MS Query Analyzer on the market? I like a lot of the functionality provided by QA but want extra stuff like you get in VB6: intelli-sense (sytanx prompting), auto-complete (CTRL+Space provides list of sp's and tables, etc.) plus any other time saving features.
I've tried a few products but nothing quite hits the mark. Is there a program you use and recommend I trial?
Does anyone know if it is possible to use the XML Editor in SQL 2005 to write xml files from scratch? If possible, how is the editor being started? As of my current knowledge, I am only able to start the XML Editor by clicking on the content of a XML data type column within the sql query result pane.
I would like to use SQL client-side reporting in ASP.NET. However, our customer would like to edit the report sometimes, is there any existing graphical editor to edit .rdlc file? Thanks.
I am using SSIS to extract data from sql server and import into MDB file. In the process, under data flow task, I have used OLE DB Source Editor as source. Here i have choosen SQL Command as mode of data population. In the box below i have typed the following statements.
"Exec Site_Address"
I have used many temperory tables in this procedure. When i run this procedure in the query analyzer window i get the desired data which has to be imported to an MDB. After typing the above statements and when i click the button preview i can see the data. But when i click the Columns.... i dont see anything there. I am unable to see any columns there. This is getting to my nerves because, when i use OLE DB as Destination i am unable to map the columns and i get an error.
I dont know how to solve this problem. cannot we map columns in temp tables .... or wat is it ??
Please help me to find a solution.
I will also paste the procedure code that i have used.
Create procedure Site_Address
as
begin
create table #Data_For_Site_Address_Table
(
unitid varchar(20),
city varchar(50),
cust_num varchar(40),
zip varchar(20),
CountryID varchar(20),
CreatedBy varchar(20)
)
-- tblcrdsiteaddress
insert into #Data_For_Site_Address_Table
select distinct * from
(select
(select top 1 fsu.ser_num
from fs_unit fsu
where ca.cust_seq <> 0 and fsu.cust_num = ca.cust_num
order by ca.city desc) as UnitID,ca.city,ca.cust_num,ca.zip,
CASE
WHEN ca.country like 'Luxembourg' THEN 'LU'
WHEN ca.country like 'Deutschland' THEN 'DE'
WHEN ca.country like 'Austria' THEN 'AT'
WHEN ca.country like 'Czech Republic' THEN 'CZ'
WHEN ca.country like 'Denmark' THEN 'DK'
WHEN ca.country like 'CHINA' THEN 'CN'
WHEN ca.country like 'CROATIA' THEN 'HR'
WHEN ca.country like 'Egypt' THEN 'EG'
WHEN ca.country like 'Germany' THEN 'DE'
WHEN ca.country like 'Hungary' THEN 'HU'
WHEN ca.country like 'Jordan' THEN 'JO'
WHEN ca.country like 'Korea, Republic Of' THEN 'KR'
WHEN ca.country like 'Poland' THEN 'PL'
WHEN ca.country like 'Switzerland' THEN 'CH'
WHEN ca.country like 'United Kingdom' THEN 'GB'
ELSE '- N/A -' END AS CountryID, CA.CreatedBy
from custaddr ca
) al
where unitid is not null
Select TT.Unitid as Short_Site_Name, TT.City as Site_Name,'N.A' as Street_Po_Box,TT.Zip as Postal_Code_City, Null as State_Region,
TT.CountryID as CountryID,Null as Zone, Null as Note, TT.CreatedBy as UserID, GetDate() as Date, 'A' as [Action]
If I implement a custom editor by inheriting from UITypeEditor, Can I invoke it at RUN TIME from a standard control other than PropertyGrid, say a comboBox or a button ?
If it is possible, could you please let me know how to do it or could you please direct me to some URL which shows how to do it.
Do I have to create a custom control that inherits from control for doing this ?
Hi. Is there a T-SQL Editor for SQL CE 3.5 in VS 2008 other than the Query Designer?
I'm used to writing and running sql queries using the MSSMSE 2005 query editor and was looking for something similar in the VS 2008 as MSSMSE 2005 can't open sql ce 3.5 db files. I've found the T-SQL Editor (Data->T-SQL Editor) but unfortunately it only seems to work with regular SQL Server databases and not sql compact sdf files.
Am I missing something or is Query Designer the only way to go (I really hate how it messes with my queries and doesn't let me execute only parts of the queries I write :/ )?
SELECT dbo.incident.incident_ref, Customer.cust_n,incident.date_logged FROM incident INNER JOIN Customer ON incident.incident_id = Customer.cust_id WHERE incident.date_logged BETWEEN @date_from AND DATEADD(day, 1, @date_to)
I need to use a condition here to display customer based on my selection in dropdown list (Include ABC )
Is it possible to use a parameter in a ldap query using the ADsDSOObject provider? I keep getting an error "The ICommandWithParameters interface is not supported by the "ADSDSOObject" provider". Command parameters are unsupported with the current provider.
I don't have a linked server on my DB server to Active Directory so I'm just querying in the SSRS report design. Here is my query for my dataset. If I hard code an example it works. Just doesn't work when I pass a parameter. I've tried making it an expression (= sign), Tried several syntax's, Tried everything I can think of. Is this possible? or do I just need to push for a linked server?
I have just installed MS SQL Server 2005 and SQL Server Management Studio Express on my server but when I try to open a MDF file for manual editing I am told no editor exists. Is the software I have installed able to open a MDF file?
Is anyone aware of a tool that will allow users to update the values of a sql table via a web page? What I am looking for is a tool that when given the name of a table will generate a web front end to allow editing of the table.