dbTalk Databases Forums  

Filter using Passthrough SQL

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Filter using Passthrough SQL in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pj4u_73@hotmail.com
 
Posts: n/a

Default Filter using Passthrough SQL - 04-05-2005 , 12:21 PM






We have an application that issues passthrough SQL queries to an OLAP
cube via a Linked Server. How can we specify a range of data in the SQL
criteria(WHERE Clause) passed to the Cube? Ideally I would like to use
the greater than and less than operators for a date range.

Thanks
Ryan


Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Filter using Passthrough SQL - 04-07-2005 , 07:17 PM






Create a view and then load AS from it rather than the original table.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

<pj4u_73 (AT) hotmail (DOT) com> wrote

Quote:
We have an application that issues passthrough SQL queries to an OLAP
cube via a Linked Server. How can we specify a range of data in the SQL
criteria(WHERE Clause) passed to the Cube? Ideally I would like to use
the greater than and less than operators for a date range.

Thanks
Ryan




Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: Filter using Passthrough SQL - 04-12-2005 , 04:49 PM



Sounds interesting - in the view what would you put int he where clause ? A
variable ?


"Dave Wickert [MSFT]" <dwickert (AT) online (DOT) microsoft.com> wrote

Quote:
Create a view and then load AS from it rather than the original table.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no
rights.

pj4u_73 (AT) hotmail (DOT) com> wrote in message
news:1112718089.169288.147220 (AT) o13g2000cwo (DOT) googlegroups.com...
We have an application that issues passthrough SQL queries to an OLAP
cube via a Linked Server. How can we specify a range of data in the SQL
criteria(WHERE Clause) passed to the Cube? Ideally I would like to use
the greater than and less than operators for a date range.

Thanks
Ryan






Reply With Quote
  #4  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Filter using Passthrough SQL - 04-12-2005 , 05:34 PM



Yes and No. You might have a control table which represents your date range:

create table my-control (begin-date datetime, end-date datetime)

insert into my-control values ('1/1/2004', '1/1/2005')

create view load-as as
SELECT t.* from <linktable> t
WHERE t.date between (select begin-date from my-control) AND
(select end-date from my-control)

then load Analysis Services from the view "load-as" -- no parameters are
needed.
Just update your control table when you want a different window from the
linked server.

Hope that helps.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Michael Vardinghus" <michaelvardinghus (AT) hotmail (DOT) com> wrote

Quote:
Sounds interesting - in the view what would you put int he where clause ?
A
variable ?


"Dave Wickert [MSFT]" <dwickert (AT) online (DOT) microsoft.com> wrote in message
news:OCagof8OFHA.3512 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Create a view and then load AS from it rather than the original table.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no
rights.

pj4u_73 (AT) hotmail (DOT) com> wrote in message
news:1112718089.169288.147220 (AT) o13g2000cwo (DOT) googlegroups.com...
We have an application that issues passthrough SQL queries to an OLAP
cube via a Linked Server. How can we specify a range of data in the
SQL
criteria(WHERE Clause) passed to the Cube? Ideally I would like to use
the greater than and less than operators for a date range.

Thanks
Ryan








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.