Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
| Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 23rd, 2004, 06:38 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default MDX - where clause with parameters??

Hi,
I know that this might not be the right forum as it is for SQL language and my question is about MDX syntax, but as I have had a lot of help from here before I give it a try anyway. Ther might be someone who knows.


I have the following question

="SELECT {[Measures].members} on columns, NON EMPTY CROSSJOIN([aktor].[aktor].members, [Innovation].[utl].members) on rows FROM MedFact WHERE (" & Parameters!pFinance.value & ")"

I have populated one dataset for the "pFinance" parameter and one for another parameter, "pTime"

My question is; What is the correct syntax to add the pTime parameter so I get a AND in the where clause? What I want is something like: SELECT ...... WHERE pFinance AND pTime

Thanks in advance

  #2 (permalink)  
Old August 23rd, 2004, 09:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Let me give a try,

WHERE (" & Parameters!pFinance.value & " AND " & Parameters!pTime.value & ")"

Does this help?

_________________________
- Vijay G
Strive for Perfection
  #3 (permalink)  
Old August 24th, 2004, 01:35 AM
Authorized User
 
Join Date: Apr 2004
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the right syntax. The where clause should be like this

WHERE (" & Parameters!pFinance.value & ", " & Parameters!pTime.value & ")"

  #4 (permalink)  
Old August 24th, 2004, 05:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Oh... that was different from normal usage of where in T-sql. But I did a lot of search on the net, could not find one for you, so did a guess. Glad that you found it.

Cheers!

_________________________
- Vijay G
Strive for Perfection


Similar Threads
Thread Thread Starter Forum Replies Last Post
MDX lem SQL Server 2005 1 June 6th, 2008 03:40 PM
Recursive Relationships with MDX Dima20 BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 October 6th, 2006 04:45 AM
Mdx queries and java mybestfuture SQL Server 2005 0 September 12th, 2006 05:56 AM
MDX filters an Parameters GabrielP BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 2 May 16th, 2006 08:31 AM
MDX, Crystal Reports, and OLAP MariaLua SQL Server 2000 2 August 24th, 2004 05:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.