I want to write a query which does something like 'get sales data in 2006 for products with names starting with "bond" '. My problem is writing mdx which can filter products names which contain certain word in a certain format and also output the matched product name.
In MDX, is it possible to filter dimension members using regex? If regex support is not available, is there sql 'like' operator in mdx.
hello people, I have a table with some field named 'f1', the filed contains string like this:
1:3-12/23.2:3-23/12.78:4-12/11 and so on with the same format...
I need to write some sql query that extracts all the first one or two numbers that appears before the ':' (all the red numbers in the example above). I don't mind if I get the result as a set of rows or a string that contains all the (red) numbers. is it possible with mssql?
I have a field in my table that in my transformation I like to replace all characters except (letters,digits,space and hyphen) with "". Is it possible to do that in SSIS package and possibly though regex?
While working on a recent project, I needed to import a number of old mainframe generated text reports. Since they didn't work on the one-record/one-row construct, the Flat File Source won't work.
So, I created a custom component that allows you to specify a Regular Expression pattern, and it will parse a text file and return columns. Each capture in the RegEx pattern is returned as a column, and you can also specify column names in the regex with the standard (?<colname>) syntax. The code is fairly basic really, but if you are comfortable with regular expression syntax, it can handle a huge variety of unusual text file formats. It also includes a UI editor for the RegEx pattern property that will allow you to test the pattern against a sample text file; it will highlight each row in blue and each column in green (see screenshot)
Since this might have applications for other folks, I added it to SourceForge under GPL. So if you might find that functionality useful, please check out http://sourceforge.net/projects/textregexsource/ and send me some feedback. There isn't much there yet, so check out the screenshots/news/release notes for the basics.
If there is demand, I'll create a more robust install package and documentation. Also looking for feature suggestions.
I have the following query I am bulding, its returning the desired results I am just really bad at control statements in TSQL.
What I want to do is dynamically pass the "and landingPage like '/products%' to the SPROC. If I pass nothing this part of the query is not added.
Also, I am wondering how difficult it would be to pass some RegEx into the "landingpage like '%asdf' " part of the query ? I have started reading some articles but it seems pretty complicated. I am running sql2005 so I am clear on that part.
I have a text field that contains abstract information formated inHTML, I'd like strip the HTML and insert the data in another Textfield within a DTS package. Is this possible?any suggestions would be appreciatedMatt
I am learning the string functions and the database that I'm using is AdventureWorks2012.However ,while practicing I was just trying to hide the phone number with '*' mark,but not getting the desired result.So the code is.............
SELECT PhoneNumber, (SUBSTRING(PhoneNumber,1,2)+REPLICATE('*',8)+ SUBSTRING(PhoneNumber,CHARINDEX('[0-9][0-9]{1,2}',PhoneNumber),LEN('-555-01')))AS[PhoneNumber] FROM Person.PersonPhone
I've got an nvarchar(max) column that I need to transform with some simple text processing: insert some markup at the very beginning, and insert some markup just before a particular regular expression is matched (or at the end, if no match is found).
Since the SSIS expression language doesn't support anything like this, is a Script Component the only way to go? Does Visual Basic .NET provide regular expression matching?