Friday, March 23, 2012
How could I modify it as MDX Parameter?
I have a MDX syntax as follow
select
[Measures].[Amount] on columns,
[XX03Buyer] on rows
from cubeef
where [XX01Product].[XX01Product].&[2212]
and want to change .&[2212] as Parameter,
that I can select Product code like 2200, 2211.
So, how should I do?
Thanks for any advice!
AngiSet up your parameter as you would normally then in the mdx change it to
="select" & "[Measures].[Amount] on columns, "
& "[XX03Buyer] on rows "
& "from cubeef "
& "where [XX01Product].[XX01Product].&["& Parameters!ProductID.Value &"]"
That should do it, as long as i got the syntax right. Problem with this is
that you can't test it unless you preview it. So if you want to get more
from you MDX suxh as more fields you need to take out all the quotes and &'s
and the = at the beginning. So my advice is save a copy of the MDX query
for a particular product so you can refresh your fields easily.
hope that helps
Greg
"Angi" <enchiw@.msn.com> wrote in message
news:%23pZmQPw9FHA.2644@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have a MDX syntax as follow
> select
> [Measures].[Amount] on columns,
> [XX03Buyer] on rows
> from cubeef
> where [XX01Product].[XX01Product].&[2212]
> and want to change .&[2212] as Parameter,
> that I can select Product code like 2200, 2211.
> So, how should I do?
> Thanks for any advice!
> Angi
>sql
Monday, March 12, 2012
How can we modify the files path for the database in database engine?
Hi, all experts here,
Thank you very much for your kind attention.
I am trying to modify the files path (primary file, log file) of databases, but it looks like I am not able to mofidy their files path directly from the database property dialogue? Would please any experts here give me some ideas on what else can I try to figure it out? Thanks a lot in advance and I am looking forward to hearing from you shortly.
With best regards,
Yours sincerely,
I don't think it's possible to modify file paths when the database is active (read only)
I'd suggest DETACH, RE-ATTACH with different file path
should take < 1 minute
|||You can not just change the path. You have to either detach and attach the database or backup and restore the database. Detach and attach will be faster and easier with less chance of data loss.
Both options are offline procedures.
|||Hi, all,
Thanks a lot for your kind advices.
With best regards,
Yours sincerely,
|||Hi Helen,You cant change the filepath when the database is in online. When sqlserver starts it will check for the path of database (from sysaltfiles tables) and it will start accessing the files. Once the database is online it will lock the file (you cant even copy the physical file through OS).
You can detach the db and move the physical file to the path you needed and the attach the db. It will work fine.
The above description is only for user dbs.|||
Hi, Sagar,
Thanks a lot for your very kind advices and help.
With best regards,
Yours sincerely,
How can we modify the files path for the database in database engine?
Hi, all experts here,
Thank you very much for your kind attention.
I am trying to modify the files path (primary file, log file) of databases, but it looks like I am not able to mofidy their files path directly from the database property dialogue? Would please any experts here give me some ideas on what else can I try to figure it out? Thanks a lot in advance and I am looking forward to hearing from you shortly.
With best regards,
Yours sincerely,
I don't think it's possible to modify file paths when the database is active (read only)
I'd suggest DETACH, RE-ATTACH with different file path
should take < 1 minute
|||You can not just change the path. You have to either detach and attach the database or backup and restore the database. Detach and attach will be faster and easier with less chance of data loss.
Both options are offline procedures.
|||Hi, all,
Thanks a lot for your kind advices.
With best regards,
Yours sincerely,
|||Hi Helen,You cant change the filepath when the database is in online. When sqlserver starts it will check for the path of database (from sysaltfiles tables) and it will start accessing the files. Once the database is online it will lock the file (you cant even copy the physical file through OS).
You can detach the db and move the physical file to the path you needed and the attach the db. It will work fine.
The above description is only for user dbs.|||
Hi, Sagar,
Thanks a lot for your very kind advices and help.
With best regards,
Yours sincerely,