Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Monday, March 26, 2012

Reg Exp for digits

Hi,

This is not SQL Server database problem, however, net search has failed
to generate a solution to the problem, I'm trying my luck at this NG
now.

Problem, remove the special character, [ from text.
e.g. text =
"this is [1] and [stuff] and some [2] and hat [3] and dog"

Desired result =
"this is 1 and [stuff] and some 2 and hat 3 and dog"

I know [[:digit:]] would find all the instances of digits inside
brackets such as [1], [2], [3]. However, I don't know how to get rid
of the special characters of [ and ].

Any regular expression expert out there?

Thanks.

DonNickName (dadada@.rock.com) writes:
> This is not SQL Server database problem, however, net search has failed
> to generate a solution to the problem, I'm trying my luck at this NG
> now.
> Problem, remove the special character, [ from text.
> e.g. text =
> "this is [1] and [stuff] and some [2] and hat [3] and dog"
> Desired result =
> "this is 1 and [stuff] and some 2 and hat 3 and dog"
> I know [[:digit:]] would find all the instances of digits inside
> brackets such as [1], [2], [3]. However, I don't know how to get rid
> of the special characters of [ and ].
> Any regular expression expert out there?

Since you did not specify which regular expressions you are using, I'm
taking the liberty to answer with the regexps I know, that is those of
Perl. In Perl you would say:

s/\[([0-9]+)\]/\1/g

The \[ means [, that is \ is an escape charactter. () is for grouping,
and \1 refers back to this paren.

I have only seen glimpses of the regexps in .Net, but it appears to be
similar to Perl. There might be different rules for when you need \
though. In Textpad that I use, I would have to say \( and \)to use parens
for grouping.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||> Problem, remove the special character, [ from text.
> e.g. text =
> "this is [1] and [stuff] and some [2] and hat [3] and dog"
> Desired result =
> "this is 1 and [stuff] and some 2 and hat 3 and dog"

Using the Zeus editor:

http://www.zeusedit.com

These are the search and replace regular expresions:

Search: (\[)([0-9]+)(\])
Replace: \2

Note: Zeus is shareware (45 day trial).

Jussi Jumppanen
Author: Zeus for Windows|||Jussi,

Thanks for the response, I think your tool seems clever, and yet I'm
trying not to introduce many tools within one project.

Don.|||Erland,

I appreciate your response, unfortunately I'm not using Perl.

Don|||NickName (dadada@.rock.com) writes:
> I appreciate your response, unfortunately I'm not using Perl.

If in you insist on not telling what you use, the responses may not always
be applicable.

Anyway, I hoped that you would be able to translate the Perl stuff to
whatever you are using.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||NickName wrote:

> Thanks for the response, I think your tool seems clever, and
> yet I'm trying not to introduce many tools within one project.

The good thing is the regexp's that I posted are just standard
unix style regexp's so they should work with any tool that can
handle these type of regexp's.

Jussi Jumppanen
Author: Zeus for Windows
http://www.zeusedit.com|||Shoot, you're tricky, now that you say it's sort of generic, I tried it
and it works nice, thanks.|||Erland,

Jussi's solution solved the problem. You seem a very kind person, if
one day I travel to Sweden and you're available, I would love to buy
you a beer.

Kind regards,

Don Lisql

refreshing report data

I found a post by someone who was having a problem with their reports
refreshing and the solution they got was...
"Please make sure that Report property "Autorefresh" is set to 0
(disabled)"
Where is this report property' I can't find it and I need this to
refresh my report...It's in the Report Properties dialog -> General tab.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Gearoid" <gearoid_healy@.yahoo.com> wrote in message
news:3d6ebe80.0409290348.6e07573b@.posting.google.com...
> I found a post by someone who was having a problem with their reports
> refreshing and the solution they got was...
> "Please make sure that Report property "Autorefresh" is set to 0
> (disabled)"
> Where is this report property' I can't find it and I need this to
> refresh my report...|||this isn't critical but I'm just curious at this stage - that option
isn't there for me... I've SP1 installed - does that make a
difference? Here's what I see on my report properties - general
tab...
Modified Date: 29/09/2004 15:58
Modified By: DOMAIN\user
Creation Date: 29/09/2004 15:58
Created By: DOMAIN\user
Size: 77 KB
Properties ----
--
Name: |______________________________|
Description: ---
| |
| |
| |
| |
|___________________________________________|
--
|_| Hide in list view
Report Definition ---
Edit Update
-- --
----
-- -- -- --
|Apply| |Create Linked Report| |Delete| |Move|
-- -- -- --
Create a linked report when you want to use different security or
parameters with the report.
"Ravi Mumulla \(Microsoft\)" <ravimu@.online.microsoft.com> wrote in message news:<#GhnpIjpEHA.2684@.TK2MSFTNGP11.phx.gbl>...
> It's in the Report Properties dialog -> General tab.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Gearoid" <gearoid_healy@.yahoo.com> wrote in message
> news:3d6ebe80.0409290348.6e07573b@.posting.google.com...
> > I found a post by someone who was having a problem with their reports
> > refreshing and the solution they got was...
> >
> > "Please make sure that Report property "Autorefresh" is set to 0
> > (disabled)"
> >
> > Where is this report property' I can't find it and I need this to
> > refresh my report...sql

Friday, March 23, 2012

Refresh calculation when working on imported as db

Hi,
I created a new solution and imported an AS db to it so I can avoid to work on the database itself.
Now, when I change an MDX formula in a calculation, I cannot see the change effect in the browser without re-processing the cube.

What Am I missing? There sure is a way to see the effect of a calculation change by using some kind of refresh? I tried re-connect and refresh and save, nothing works.

Thanks,
Philippe

The BI project you imported is offline, changes to calculations are only saved to the local .cube file (while the cube browser gets the data from the live server). That's why you need to re-deploy (not necessarily with processing though) on the server. For editing calculations and quickly seeing the effects, it's easier to work in online mode (from Visual Studio, File -> Open -> Analysis Services Database).

Adrian Dumitrascu

|||

Adrian Dumitrascu wrote:

The BI project you imported is offline, changes to calculations are only saved to the local .cube file (while the cube browser gets the data from the live server). That's why you need to re-deploy (not necessarily with processing though) on the server. For editing calculations and quickly seeing the effects, it's easier to work in online mode (from Visual Studio, File -> Open -> Analysis Services Database).

Adrian Dumitrascu

Yes Offline you need to deploy before you see the changes, in online mode you need to SAVE to see the changes.

That requires some tricky organization when working as a team...

Also, tough not to break something working when changing a formula.
Lastly Sourcesafe becomes hard to use like that.
SourceSafe does a poor job anyways with cubes. When you delete an object like cube or dataview you cannot get it back from the history. It shows it in the project exlporer but says object has been deleted and is invalid...

I sure yet have to master VSS however I suspect that there is room for improvement in this working model.

Philippe

Monday, February 20, 2012

Reduce Records Shown From Dimension

Hi There,

I'm relatively new to AS2005, so you'll have to excuse me if there is a simple solution that has been overlooked.

Here is the situation - We have a fact table, linked to several dimensions - one of them being a generic date dimension used by a number of fact tables. The Date Dimension has all dates ranging from 1901 to 2100, but the fact table I am querying just has records from 2005 to present. Once the cube is processed and I open the cube in Excel (for example) it lists every date from the Date Dimension, is there any way to limit which dates are processed into the cube to those that just appear in the fact table (in essence - what would be an Inner Join in TSQL).

Hope this makes sense,

Regards,

Tobias

Are you using the dimension on rows or columns? Or as a filter?

If it is rows or columns you change the setting to not show empty values.

If it is a filter, you could create a set that only contains only those dates that has rows. Regardless, you could probably remove a lot of dates from the time dimension that is not used by any fact table and/or create a view that adds dates as time goes by.|||

Instead of telling the cube (via the data source view) to read directly from the time dimension table, we tend to use db views that restrict the members to only those members that appear in the fact table. You can change the dsv to read from the view and you will then only get dates that appear in the fact table.

However, with the time dimension, you want to make sure you fill in all dates of a year -- if you don't you can't really do year-over-year comparisons reliably. So, perhaps you can have the view return all dates from your time dimension table that start AFTER the first date in your fact table. You can use similar logic to restrict the dates on the high end as well.

|||

So does this mean, for each fact table - you have a different view set up?

We have about 15-20 cubes that we want to set up which all use the time dimension, with varying volumes of historical data from each of the source systems. Is it best practise to then limit the data returned by the dimension for each group of cubes?

I was hoping that there would be a technique/feature that prevented 'redundant' (i.e. rows that do not have a related fact record) dimension members from appearing in the cube, that way we could begin to build the suite of cubes in a smaller number of projects and reduce administrative overheads (by having several Time Dim views for different date ranges for example)

Regards,


Tobias

|||

Well, our one view looks at all of our various fact tables to determine which entries are needed.

The problem you have is that Excel will list out all dimension members, so I'm not sure what the best solution is for you. But I don't think there is magic property that you can tell Excel to list only dimension members that are only for a particular cube.

|||Is it Excel 2007 you use? Because then you can create a named set that only contains dates that are non empty, has rows in the fact table connected to it. I′m not sure if Excel 2003 can use sets.|||We're using Excel 2003. shame there isn't a feature that does that.|||

Even in Excel 2003 pivot table, you have the option to hide the members that do not have data.

As you are using time dimension in different measure groups, the best practice would be to create hierarchy in the date dimension like Year ==> Month ==> Date levels that would make the navigation easier for the users. There are lot of articles on ways to handle it. Pl refer to BOL and newsgroups.