ADHOC Reports Using OLAP Cubes
Mar 13, 2008
Hi,
i want to know whether it is possible to develop ADHOC reports using SSRS 2005 and OLAP Cubes. the requirement is the user should be able to select the columns he wants to see in the report.
I think this requires Dynamic RDL generation. It is very urgent. i have to give POC to the client on this. Any help in this regad is appreciated.
Thanks,
Srik
View 4 Replies
ADVERTISEMENT
Apr 19, 2006
Hi
I try to design a report with Chart based on an Analysis Services Data source...
It does'nt work !!!
Has anyone else the same problem??
View 2 Replies
View Related
Mar 3, 2004
When I try to modify a OLAp Cube, suddenly appears a Error message
"Unknow Error. Restart the Application"
And this break my cube down
This is not always, just some time, for example when I proof the cube on Microsoft Excel or After I backed up the databes of analysis
What can I do?
I'll thanks your quick answer
NOTE: My cube use MOLAP aggregations
View 1 Replies
View Related
Aug 18, 2000
I'm looking into adding OLAP Cubes as part of our software to be distributed with our OLTP and eventually OLAP databases.
Is there any books that deal with distributing OLAP Cubes and or security.
Our clients will have SQL Server with our databases.
Thanks
View 1 Replies
View Related
Mar 16, 2000
Is there a way to script your OLAP cubes created in OLAP Manager to e.g. text files with CREATE CUBE and SELECT INTO statements.
View 1 Replies
View Related
Jul 20, 2005
I cannot seem to find a group where this question would fit so I amposting it here. I have what I believe is a unique situation. I amusing SQL Server Analysis Server to build a cube of "snapshot"month-end type of data. This data is from an instance of MicrosoftNavision and I have successfully used SQL-DMO and DTSPackage Libraryobjects to allow the user to rebuild the cube through Navision. Thisis accounting data and as such, the accountants want to be able toarchive this data by month. I know through Analysis Server Managerinterface I can copy the cube and save it to a different name.I would like to know if there is a way to programmatically save a cubeto a different name with some type of automation object?Thanks
View 1 Replies
View Related
Dec 26, 2007
While creating a model, i can access to relational tables as data source, but not to olap cubes. Is it possible to browse olap cubes for mining? If yes, how? Thanks...
View 4 Replies
View Related
Jul 12, 2000
How can we allow users to access a MS SQL Server OLAP cube but restrict the level of data that he might see?
I mean, if there is a cube with data for three different countries. How can one user be restricted to see data pertaining to
only one of the countries and not the other two countries?
View 2 Replies
View Related
Sep 14, 2000
Does anyone know the best way to set up filters against the Cube data.
Ex. The Cube was built with data for 1998,1999, 2000.
The totals and the rollups will include the value for all years.
Client A want to access the Cube Data through Excel 2000 but only wants to see the values for 1999 - with the correct totals and rollups...
I know you can uncheck the other years in the filters in excel, but the totals and rollups will still include the values summing for all years.
Is there away to pass in a query on the fly?
Thanks.
View 1 Replies
View Related
Dec 14, 2000
Can someone tell me how you can automate the refresh of OLAP Cubes? I just inhereted a data warehouse running on SQL7 and the idea of having to go in and manually refresh the cubes everyday is, well... stupid. I can't believe that they've been doing this for a year. Unfortunately, I'm not familar enough with MSOLAP yet and I can't figure this out. Any tips?
View 2 Replies
View Related
Oct 9, 1999
How can I move OLAP Databases / specific cubes or virtual cubes from our Development Server to the UAT or LIVE servers ?
Thanks,
Lee
View 1 Replies
View Related
May 24, 2007
Hi, all experts here,
Thank you very much for your kind attention.
I am having a question on the SSAS2005 OLAP Cubes storage modes. We know SSAS2005 supports 3 different storage modes: ROLAP, MOLAP, HOLAP.
Do all these three storage modes of cubes store data in another physica analysis services databases which are inrelative from their data warehouse (in case they are built on top of the data warehouse)? (so it does not matter at all even we remove the data warehouse?)
Thank you very much in advance for your help and I am looking forward to hearing from you shortly.
With best regards,
Yours sincerely,
View 7 Replies
View Related
Nov 16, 2007
Hi all,
Does anyone know if its possible to set up OLAP Cubes in a Winform?
Thanks,
Rob
View 2 Replies
View Related
Feb 13, 2012
I am attempting to create som OLAP cubes using the NAV 2009 SP1 database. I am using Jet Enterprise with TimeXtender4 to build the cubes.
View 5 Replies
View Related
May 27, 2015
I am looking for a solution for my customers who use the 2005 report models to create detail list reports. Â All I am able to find on 2012 are pivot type reports, SSAS tabular and cubes. Â It seems that MS assumes that all clients need statistical or summary reports. Â My users need to be able to create adhoc lists of data from multiple view and tables using drag and drop. Any third party distributable tool which could be used for adhoc reporting?
View 2 Replies
View Related
Jul 13, 2007
Hello,
I am using RS 2005 to design reports.
There's no problem when I connect to an Analysis Services 2005 cube.
But when I try to connect to an AS 2000 cube (Foodmart)...
I have read in this forum that I can use "Microsoft SQL Server Analysis Services" provider (or OLE DB)...
Can someone help me please!!
Thank you
View 2 Replies
View Related
Sep 5, 2007
Hi,
I would like to know if is possible to create dynamic reports based on cubes. What i mean is,after creating a cube with a couple of dimensions and measure if is there any way to give the normal users on the report manager or report builder the freedom to choose their own dimensions/measure so they can output the report with the choosen criteria.
Thanks.
View 3 Replies
View Related
Jul 20, 2005
On the subject of Data Warehouses, Data Cubes & OLAP….I would like to speak frankly about Data Warehouses, Data Cubes andOLAP (on-line analytical processing). Has it dawned on anyone elsethat these buzz words were created by some geek who decided to take astab at marketing? Knowing that to the backwoods manager who knowslittle of technology that new innovative names for old concepts wouldhelp to sale their products.I mean seriously, what is the story here? In a nut shell, and pleasestop me if you disagree, but isn’t a data warehouse simply adatabase? Can’t you do everything on a conventional databaselike SQL Server, Oracle or DB2 that you can do on these newproprietary Data Warehouse constructs? I mean who are they trying tofool?Take a look, for instance, at Data Cubes. Who hasn’t noticedthe striking similarity between data cubes and views used in all themore robust databases? Also, what about OLAP? OLAP is nothing morethan a report generator. There’s nothing you can do with thesemillion dollar price tagged Data Warehouse total solution packagesthat I can’t do with SQL Server, Oracle or DB2…for thatmatter Microsoft Access.As an example some sales people for Metadata Corporation has the VicePresident of I.T. in Nashville, for Healthspring, sold on their totalsolution data respository which is such a scam. All they had to dowas throw a couple of buzzwords at him and they have him hypnotized.Personally, I feel that these kinds of marketing practices undermineour industry. It helps to unravel what little standards orconsistency we have. What do you guys think?Stuart
View 7 Replies
View Related
Jul 20, 2005
I have created a crystal report connecting an OLAP cube .But once itry to view a report it took around 15 minutes and finaly gave anerror like "cannot retrieve data from cube".I want to know why it isand how can i create a crystal report for OLAP CUB.
View 3 Replies
View Related
May 7, 2007
Hello,
I would like to know if Reporting Services 2005 is a good tool for making reporting activities on SQL Server 2005 DW and also using OLAP (Analysis Services 2005).
There are any limitations or bugs to using it.
This is good for trends.
Thank, any help will very appreciated.
View 5 Replies
View Related
Jan 25, 2007
Hi all - please help!
I'm running SSRS 2005 (9.00.3027.00) in Sharepoint integrated mode on a Win2003 SP1 box. This works fine for most reports, including matrix reports sourcing data from SSAS 2005.
However, I have a couple of large matrix reports (7 columns per group, 12 column groups, 150 rows, 1 row per group, data from SSAS) that run fine when I run them in VS2005, but as soon as I try and run them from within Sharepoint/Report Server I get "An unexpected error has occurred.". Sometimes this happens after 60 seconds, sometimes more (up to 3 minutes)
If I filter them down to 7 column groups they work perfectly (altbeit slowly,1-2 mins), 8 groups works sometimes, 9 never works. I've checked that the report execution timeout is set to 10 minutes.
The SSRS log shows the errors as WrapperReportRenderingException and JobCanceledException. I'm not sure whether the the rendering error causes the cancelled error or vice versa. does anyone know what I can do about this?
By the way, from looking at the CPU usage of the server, it seems as though SSRS does carry on rendering the report long after Sharepoint has given up and returned with the helpful error.
Many thanks in advance
Alex
Log extract as follows:
w3wp!library!7!01/25/2007-11:11:44:: Call to GetPermissionsAction(http://uk-ls-it-02/Reports/Triangles/Gross Triangle Treaty Property.rdl).
w3wp!library!7!01/25/2007-11:11:44:: Call to ListParentsAction(http://uk-ls-it-02/Reports/Triangles/Gross Triangle Treaty Property.rdl).
w3wp!library!7!01/25/2007-11:11:49:: Call to GetPermissionsAction(http://uk-ls-it-02/Reports/Triangles/Gross Triangle Treaty Property.rdl).
w3wp!library!1!01/25/2007-11:11:50:: Call to GetPermissionsAction(http://uk-ls-it-02/Reports).
w3wp!library!13!01/25/2007-11:11:50:: Call to GetSystemPropertiesAction().
w3wp!library!13!01/25/2007-11:11:51:: i INFO: Call to RenderFirst( 'http://uk-ls-it-02/Reports/Triangles/Gross Triangle Treaty Property.rdl' )
w3wp!runningjobs!7!1/25/2007-11:13:20:: i INFO: Adding: 1 running jobs to the database
w3wp!runningjobs!7!1/25/2007-11:14:20:: i INFO: RunningJobContext.IsClientConnected; found orphaned request
w3wp!reportrendering!13!01/25/2007-11:14:20:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: An error occurred during rendering of the report., ;
Info: Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.Threading.ThreadAbortException: Thread was being aborted.
at Microsoft.SharePoint.Library.SPRequest.OpenWebInternal(String bstrUrl, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, String& pbstrServerRelativeUrl, UInt32& pnLanguage, UInt32& pnLocale, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, Int32& plSiteFlags)
at Microsoft.SharePoint.SPWeb.InitWebPublic()
at Microsoft.SharePoint.SPWeb.get_ServerRelativeUrl()
at Microsoft.SharePoint.SPWeb.get_Url()
at Microsoft.ReportingServices.SharePoint.Server.Utility.GetSPItemMetaDataAndContent(String path, UserContext userContext, Boolean returnContent, Guid& id, ISecurableObject& secObj, SharePointImpersonatedWeb& wrapper, Byte[]& content, String& mimeType)
at Microsoft.ReportingServices.SharePoint.Server.Utility.GetSPItemType(String objectName, UserContext userContext, Guid& id, ISecurableObject& secObj, SharePointImpersonatedWeb& wrapper)
at Microsoft.ReportingServices.SharePoint.Server.Utility.GetSPItemType(String objectName, UserContext userContext, Guid& id)
at Microsoft.ReportingServices.SharePoint.Server.Utility.GetSPItemType(String objectName, UserContext userContext)
at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.Microsoft.ReportingServices.Diagnostics.IPathManager.IsSupportedUrl(String path, Boolean checkProtocol, Boolean& isInternal)
at Microsoft.ReportingServices.Diagnostics.CatalogItemUrlBuilder.IsReportServerPathOrUrl(String pathOrUrl, Boolean checkProtocol, Boolean& isPath)
at Microsoft.ReportingServices.ReportRendering.ReportUrl..ctor(RenderingContext reportContext, String initialUrl, Boolean checkProtocol, NameValueCollection unparsedParameters, Boolean useReplacementRoot)
at Microsoft.ReportingServices.ReportRendering.Action.get_DrillthroughReport()
at Microsoft.ReportingServices.ReportRendering.Action.get_DrillthroughID()
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.GetActionUri(Action action)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.HasMultipleActions(ActionCollection actions, Int32& actionIndex, RenderActionInfo& firstActionInfo)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.RenderTextBoxPercent(TextBox textBox, Boolean renderId)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.RenderReportItem(ReportItem reportItem, Int32 borderContext, Boolean renderId)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.RenderRangeCellsContent(MatrixCell lastCell, Int32 cellBorderContext)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderRangeCells(Matrix matrix, Int32 indexRow, Int32 startCell, Int32 endCell, IntList hiddenColumns, Int32 borderContext, Boolean dirLefRight)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderNonSplitMatrixLevel(Matrix matrix, MatrixMember currMember, Boolean& newRow, Boolean partialItem, Int32 level, IntList hiddenColumns, SizeCollection cellHeights, Boolean changableRows, Int32 borderContext, Boolean dirLefRight, MatrixContext matrixContext)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderNonSplitMatrix(Matrix matrix, MatrixMember member, Boolean& newRow, Boolean partialItem, Int32 level, IntList hiddenColumns, SizeCollection cellHeights, Boolean changableRows, Int32 borderContext, Boolean dirLefRight, MatrixContext matrixContext)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderMatrixContent(Matrix matrix, Boolean partialItem, Int32 borderContext, Boolean dirLefRight, Boolean expandLayout, MatrixContext matrixContext)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.RenderMatrix(Matrix matrix, Boolean partialItem, Int32& borderContext, Boolean renderId)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.RenderReportItem(ReportItem reportItem, Int32 borderContext, Boolean renderId)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderCellItems(ReportItemCollection repItemCol, Hashtable partialItems, Hashtable expandItems, PageTableCell currCell, Int32 borderContext, Int32 linkToChild, Boolean layoutExpand)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.GenerateTableLayoutContent(PageTableLayout rgTableGrid, Hashtable partialItems, ReportItemCollection repItemCol, Boolean bfZeroRowReq, Boolean bfZeroColReq, String docMapId, Boolean inDocMap, Boolean renderHeight, Int32 borderContext, Int32 linkToChild, Boolean layoutExpand)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.GenerateHTMLTable(ReportItemCollection repItemCol, Double dxParent, Double dyParent, PageData pageData, String docMapId, Boolean inDocMap, Int32 borderContext, Int32 linkToChild, Boolean expandLayout)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.HTML4Renderer.RenderRectangle(Rectangle rectangle, PageData pageData, Int32& borderContext, Boolean renderId)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderPage(Int32 index)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderPages()
at Microsoft.ReportingServices.Rendering.HtmlRenderer.BaseRenderer.RenderBody(HtmlTextWriter htmlTextWriter)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.ViewerReportArea.Render(HtmlTextWriter outputWriter)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension.InternalRender(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.Rendering.HtmlRenderer.RenderingExtensionBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.Rendering.HtmlRenderer.RenderingExtensionBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, EvaluateHeaderFooterExpressions evaluateHeaderFooterExpressions, CreateAndRegisterStream createAndRegisterStream)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached)
--- End of inner exception stack trace ---
w3wp!runningjobs!13!01/25/2007-11:14:20:: i INFO: CancelableJobExecution.Execute caught our thread abort exception
w3wp!library!13!01/25/2007-11:14:20:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.JobCanceledException: An administrator has canceled the job., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.JobCanceledException: An administrator has canceled the job. ---> Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.Threading.ThreadAbortException: Thread was being aborted.
--- End of inner exception stack trace ---
w3wp!webserver!13!01/25/2007-11:14:20:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.JobCanceledException: An administrator has canceled the job. ---> Microsoft.ReportingServices.ReportProcessing.WrapperReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.ReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.Threading.ThreadAbortException: Thread was being aborted.
View 6 Replies
View Related
Nov 5, 2007
Hi all,
I'm trying to get empty cells from an OLAP cube to display in a report designed using the Report Builder. Of the three report types, only the Table report shows the empty cells. Is there any option/setting that I need to enable to get this to work for the Matrix or Chart reports? Something like the "Show Empty Cells" option that is available in the pivot table used by BI Dev Studio?
Any help appreciated.
View 2 Replies
View Related
Jun 6, 2006
Süleyman writes "I want to transfer databases with cubes and virtual cubes from SQL 2000 Analysis Server to SQL 2005 SQL Express.
1.how i can transfer the cubes?
2.how i can transfer the virtual cubes?
3.Why i see the tables(saw)and the cubes in SQL Managment only under Tables together and nothing under cubes?
Please help me
many thanks
Süleyman from Germany/Frankfurt am Main"
View 1 Replies
View Related
Sep 19, 2000
Hello All,
Our OLAP environment involves an ETL/Data Warehouse/Data Mart server and a cube publisher server.
We would like to learn how to automate the Archival/Restore of OLAP databases. We are currently doing
it manually though OLAP Manager. Any help would be appreciated. Thanks. James.
--
James E. Bothamley
Senior Database Administrator
Dave & Buster's, Inc.
2481 Manana
Dallas, TX 75220
Work
Phone (214) 904-2296
email jbothaml@DaveAndBusters.Com
"Once in a while you can get shown the light
in the strangest of places if you look at it right"
JG 1942-1995 RIP
View 1 Replies
View Related
Jun 12, 2007
How to repair a corrupted OLAP database?
View 2 Replies
View Related
Jan 4, 2007
Hi Guru,When I ran my adhoc script below it generated only 45000 reads or 4seconds but when I wrapped it into procedure it took about two minutesor millions of reads. The parameters calling both adhoc and proc areindeed the same. I'm pretty 99.9% sure that the proc does not recompilebecause I don't mix up between DDL and DML, no temp tables or any thingto cause proc to recompile. The big difference is adhoc used index scanfor 45% but proc used bookmark lookup for 75%. Why it's so differencesince they both returned the same results?Please help...Silaphet,Below is my code,DECLARE @Modevarchar(10),@UserIDvarchar(36),@FromDatesmalldatetime,@ToDatesmalldatetime,@Insttinyint,@LocationIDsmallint,@BunitIDtinyint,@TeamIDintSET @Mode='TEAM'SET @UserID=''SET @FromDate='Dec 1 2006 12:00AM'SET @ToDate='Dec 31 2006 12:00AM'SET @Inst=28SET @LocationID=0SET @BunitID=2SET @TeamID=805--IF @Mode = 'TEAM'BEGINSELECT OffAffiliateDesc, OffLocationDesc, OfficerName, Active,TeamName, '' As BUnit,Sum(CASE WHEN StartDate BETWEEN @FromDate AND @ToDate THEN 1 ELSE 0END) As CurrYr,Sum(CASE WHEN StartDate BETWEEN @FromDate-365 AND @ToDate-365 THEN 1ELSE 0 END) As PrevYr,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 1037) AND ((OutcomeId IS NULL) OR (OutcomeID =0)) AND(DATEDIFF(dd,StartDate,@ToDate) * -1 <-30) THEN 1 ELSE 0 END) AsPastDue,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 1037) THEN 1 ELSE 0 END) As Ref,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 63) THEN 1 ELSE 0 END) As CallSched,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 64) THEN 1 ELSE 0 END) As PropPres,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 65) THEN 1 ELSE 0 END) As PropAcc,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 66) THEN 1 ELSE 0 END) As BremApp,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 67) THEN 1 ELSE 0 END) As BusBook,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeId = 106) THEN 1 ELSE 0 END) As NonQual,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeId = 992) THEN 0 ELSE 0 END) As Duplicate,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeID = 107) THEN 1 ELSE 0 END) As OutdatedFROM vw_Referrals_Grouped RIGHT OUTER JOINdbo.MyTeamsRpt ONvw_Referrals_Grouped.OfficerID = dbo.MyTeamsRpt.OfficerIdLEFT OUTER JOIN dbo.vw_Officers ON vw_Referrals_Grouped.OfficerID =dbo.vw_Officers.OfficerIDWHERE (ReferralID>0) AND (MyTeamID = @TeamID) AND ((StartDateBETWEEN @FromDate-365 AND @ToDate-365) OR (StartDate BETWEEN @FromDateAND @ToDate))GROUP BY TeamName, OffAffiliateDesc, OffLocationDesc, OfficerName,ActiveHAVING Sum(CASE WHEN StartDate BETWEEN @FromDate AND @ToDate THEN 1ELSE 0 END)>0 Or Active = 1ORDER BY TeamName, OffAffiliateDesc, OffLocationDesc, OfficerName,ActiveENDIF @Mode = 'RM'BEGINIF @BUnitId 0BEGINSELECT OffAffiliateDesc, OffLocationDesc, OfficerName, Active, ''As TeamName, OffBUnitDesc As BUnit,Sum(CASE WHEN StartDate BETWEEN @FromDate AND @ToDate THEN 1 ELSE 0END) As CurrYr,Sum(CASE WHEN StartDate BETWEEN @FromDate-365 AND @ToDate-365 THEN 1ELSE 0 END) As PrevYr,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 1037) AND ((OutcomeId IS NULL) OR (OutcomeID =0)) AND(DATEDIFF(dd,StartDate,@ToDate) * -1 <-30) THEN 1 ELSE 0 END) AsPastDue,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 1037) THEN 1 ELSE 0 END) As Ref,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 63) THEN 1 ELSE 0 END) As CallSched,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 64) THEN 1 ELSE 0 END) As PropPres,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 65) THEN 1 ELSE 0 END) As PropAcc,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 66) THEN 1 ELSE 0 END) As BremApp,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 67) THEN 1 ELSE 0 END) As BusBook,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeId = 106) THEN 1 ELSE 0 END) As NonQual,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeId = 992) THEN 0 ELSE 0 END) As Duplicate,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeID = 107) THEN 1 ELSE 0 END) As OutdatedFROM vw_Referrals_GroupedLEFT OUTER JOIN dbo.vw_Officers ON vw_Referrals_Grouped.OfficerID =dbo.vw_Officers.OfficerIDWHERE (ReferralID>0) AND (vw_Referrals_Grouped.OfficerID = @UserID)AND ((StartDate BETWEEN @FromDate-365 AND @ToDate-365) OR (StartDateBETWEEN @FromDate AND @ToDate)) AND OffBUnitID = @BUnitIDGROUP BY OffBUnitDesc, OffAffiliateDesc, OffLocationDesc,OfficerName, ActiveHAVING Sum(CASE WHEN StartDate BETWEEN @FromDate AND @ToDate THEN 1ELSE 0 END)>0 Or Active = 1ORDER BY OffBUnitDesc, OffAffiliateDesc, OffLocationDesc,OfficerName, ActiveEND--ELSEIF @BUnitId = 0BEGINSELECT OffAffiliateDesc, OffLocationDesc, OfficerName, Active, ''As TeamName, '' As BUnit,Sum(CASE WHEN StartDate BETWEEN @FromDate AND @ToDate THEN 1 ELSE 0END) As CurrYr,Sum(CASE WHEN StartDate BETWEEN @FromDate-365 AND @ToDate-365 THEN 1ELSE 0 END) As PrevYr,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 1037) AND ((OutcomeId IS NULL) OR (OutcomeID =0)) AND(DATEDIFF(dd,StartDate,@ToDate) * -1 <-30) THEN 1 ELSE 0 END) AsPastDue,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 1037) THEN 1 ELSE 0 END) As Ref,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 63) THEN 1 ELSE 0 END) As CallSched,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 64) THEN 1 ELSE 0 END) As PropPres,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 65) THEN 1 ELSE 0 END) As PropAcc,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 66) THEN 1 ELSE 0 END) As BremApp,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND (StageId= 67) THEN 1 ELSE 0 END) As BusBook,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeId = 106) THEN 1 ELSE 0 END) As NonQual,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeId = 992) THEN 0 ELSE 0 END) As Duplicate,Sum(CASE WHEN (StartDate BETWEEN @FromDate AND @ToDate) AND(OutcomeID = 107) THEN 1 ELSE 0 END) As OutdatedFROM vw_Referrals_GroupedLEFT OUTER JOIN dbo.vw_Officers ON vw_Referrals_Grouped.OfficerID =dbo.vw_Officers.OfficerIDWHERE (ReferralID>0) AND (vw_Referrals_Grouped.OfficerID = @UserID)AND ((StartDate BETWEEN @FromDate-365 AND @ToDate-365) OR (StartDateBETWEEN @FromDate AND @ToDate))GROUP BY OffAffiliateDesc, OffLocationDesc, OfficerName, ActiveHAVING Sum(CASE WHEN StartDate BETWEEN @FromDate AND @ToDate THEN 1ELSE 0 END)>0 Or Active = 1ORDER BY OffAffiliateDesc, OffLocationDesc, OfficerName, ActiveENDENDEND
View 3 Replies
View Related
Sep 4, 2007
Hello
We got third party software, we are using adhoc queries more for the Applications (i am checking the DB Dashboard, it is showing as 97% CPU for adhoc queries). Could any one suggest how to tune SQL Server (at server level) for adhoc queries, we can not change the code now.
Let me know how to improve the SQL Server, whenever 3rd party applications use adhoc queries more?
Thanks in advance.
View 1 Replies
View Related
Sep 28, 2007
Hi,
I am looking for a strategy document for Adhoc reporting. Does MS has published anything in this regard?
Thanks,
S Suresh
View 3 Replies
View Related
Feb 14, 2008
Working on partitioning a few large tables. One of the tables included a text column and the €œTEXTIMAGE_ON [PRIMARY]€? clause which would prevent the partitioning of this table. After some research we found that the data was legacy and no longer used. We updated the column on the affected rows to NULLS and altered the column to a VARCHAR(20)
I then attempted to run the ALTER TABLE SWITCH and I encountered the error
Msg 4947, Level 16, State 1, Line 1
ALTER TABLE SWITCH statement failed. There is no identical index in source table 'LocalDeltanet.dbo.testresultsjoe' for the index 'PKIDX_testSummary' in target table 'LocalDeltanet.dbo.testresults_part'.
After a lot of grief and testing I determined that the message was bogus and the real issue is that the 'sys.tables' still has €œlob_data_space_id€? with a value of 1 for this table.
I created a copy of the table with the text column and the "TEXTIMAGE_ON", then altered the column to a varchar and another table with just the varchar column and no "TEXTIMAGE_ON" spoecified. After copying the data from the original table, I tried to run the Alter Switch. It failed once again for the table with the text column that was altered to varchar, but it worked for the table that had the column specified as varchar from the start.
All other things have been checked and the two source tables in this test are identical execpt for the Text column specification. The alter column changes the definition of the column, but how would you remove the €œlob_data_space_id€? setting, since it appears that this value is causing my issues, is there anyway to update the table in place. I know I can BCP the data out, but that would take too long and would defeat the advantage of using the alter switch method.
BOL States:
The allow updates option is still present in the sp_configure stored procedure, although its functionality is unavailable in Microsoft SQL Server 2005 (the setting has no effect). In SQL Server 2005, direct updates to the system tables are not supported. This means we cannot update the table manually.
View 1 Replies
View Related
Oct 31, 2005
Hi !!We are developing an application where we need a Query tool which allows customer to do Ad-Hoc or random query.. something similar to lets say http://salebyowner.com/advancedSearch.phpWe have few more options than this on which customer can do search. I don't think dynamic query in C# code or something like that is going to help me. Am I right? Do we have to use any type of query tool or something for doing this?
View 6 Replies
View Related
Feb 6, 2004
Okay... We have a SQL2K database that has about 500 tables or so. It is normalized to a reasonable level and enforces all relationships with PK/FKs, not triggers. Hence, for a database-minded person it is fairly easy to read (as easy as a 500+ table database can be!).
Our users need adhoc query capabilities. Our report writer is simply overwhelmed. He doesn't need to be spending time writing a report that is intended to be run once.
I expect the best alternative would be to use some sort of adhoc reporting tool that is based off meta data. We (the DBAs) could be responsible for maintaining the meta data and STILL have a manhour savings over developing all these reports.
Here's the catch... We are on a TIGHT budget (aerospace industry is still reeling a bit). Is anyone using a product or aware of a product that might be just the ticket for us? We have been investigating a product by LogiXML called LGX AdHoc (http://www.logixml.com/products/AdHoc/adhoc.htm). Looks promising. Anyone use or familar with it?
View 1 Replies
View Related
Apr 17, 2015
I am trying to write a query that counts how many clients were part of program at the first of each month.To make it simple, the data comes out of one table which looks like this:
Client # Program Start_date End_date
1 Fruit eater 03-27-2014 01-10-2015
2 Veggi eater 01-16-2015 null
3 Veggi eater 12-05-2013 04-16-2015
4 Fruit eater 10-01-2014 11-30-2014
Currently I have a very ugly solution that I know is not the best one:
Select
sum(convert(int,Jan_2014))as Tiers_in_Jan_2014
, sum(convert(int,Feb_2014)) as Tiers_in_Feb_2014
, sum(convert(int,Mar_2014 )) as Tiers_in_Mar_2014
, sum(convert(int,Apr_2014 ))as Tiers_in_Apr_2014
[code]....
Is there a better way to write this query?
View 3 Replies
View Related
May 6, 2008
Hi,
Using Reporting Service 2005, I want to give User an Interface where user can directly paste sql query like -
select * from employee.
and corrosponding data will be displayed to user.
Is there are any way?
Thanks,
Ashwin
View 6 Replies
View Related