[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Sql Server 2008: Data Mining Project in BIDS: Why cant data source views be based on a query?

Posted on 2011-03-17
8
Medium Priority
?
564 Views
Last Modified: 2013-11-15
Hi,

I've created an analysis services project in BIDS with the intention of creating a mining strucuture. I notice that you cannot create a data source view based on a query and that it must be based on linking actual tables (via the access looking GUI).  In my scenario I have a very long and complicated query which uses temp tables to retreive the data I want to use for mining.   Am I forced to insert this data into a table in order to create and use a mining structure?  Or are there other ways to do it?
0
Comment
Question by:BostonMA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 37

Accepted Solution

by:
TommySzalapski earned 1500 total points
ID: 35158614
If you have SQL Server 2008, then you can use SQL Server Management Studio to create a view based on a query. I've never used BIDS, so I don't know if you can do it directly in there, but I don't see why it wouldn't be better to put the view in SQL Server. That's the way we do it for all our data mining.
0
 
LVL 4

Author Comment

by:BostonMA
ID: 35158865
Convincing our DBA that adding huge analytical queries as views in the database is going to be a difficult sell.
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 35158982
Why? You could set it to only update the view on demand and it would be the same as running the view from BIDS as far as performance goes wouldn't it?

Anyway, I've had a similar issue with Excel, but if I create the view and then hit 'Edit Query' I can actually manually edit the query and put whatever I want in there. I assume BIDS has a similar capability. I'll look around and see if I can find it, or maybe someone else will chime in who already knows.
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 4

Author Comment

by:BostonMA
ID: 35159877
The analytical query is based on temp tables.  When I try to create a view based on sql with temp tables I get the following message:

Views or functions are not allowed on temporary tables. Table names that begin with '#' denote temporary tables.

Also regarding your suggesteion that similar to excel, you can 'edit query'.  That same functionality exists in BIDS, but it wont take sql with temp tables create statements.

So it looks like I'm back to having to create a table for this data, unless i rewrite the query not to use temp tables. Any  other ideas?
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 35160070
Oh, that makes more sense. If my following comments make no sense, then I might not understand yet exactly what you are trying to do.
When I try to create a view based on sql with temp tables
Instead of using temp tables, why not use nested select statements in the query. Just make one big SQL friendly query for your view that doesn't require using the # temp table things.
You can do SQL like
SELECT Table2.x,Table2.y,Table2.z
FROM (SELECT Table1.a,Table1.b,Table1.c FROM Table1) Table2
So you can avoid the special temp tables and just make one big SQL query.

When I try to create a view
I thought your DBA didn't want this view in there. Or is this a view in BIDS. If so (and the above doesn't work), can't you make other views in BIDS instead of temp tables?
0
 
LVL 4

Author Comment

by:BostonMA
ID: 35160244
Because of the size of our database, using temp tables is necessary. When I've tried only using derived tables (you call them nested select statements) in the past,  the query never returns results.  Sometimes using a temp table is required for the analysis.

The DBA doesnt want the views in the production system.  I'm in a development enviroment.  You cant create a view in your BIDS project, you can only use whats on the server, which is the gist of this question. It appears you can only use views and tables to base your data mining data source from which seems very weird.  
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 35162726
I don't see why derived tables should be any different then temp tables in functionality. There are tons of excellent SQL query writers on this site (I'm pretty good, but there are many better). It's almost a guarantee that we/they could help you get it working with derived tables.
0
 
LVL 4

Author Closing Comment

by:BostonMA
ID: 35300365
It didnt really answer my question of why you cant use a query, but thats ok.
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question