Regex Task?

Apr 13, 2007

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?



Thanks for your time in advance.



View 6 Replies


ADVERTISEMENT

Mdx Using Regex For Name

May 27, 2008



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.

Thanks,
Chandra.

View 3 Replies View Related

RegEx Problem

Apr 7, 2006

Can anyone tell me what is wrong with my regex plz:

Code:

Like "[A-Z][A-Z][0-9][0-9][0-9][A-Z][A-Z]" Or " [A-Z][A-Z][0-9][0-9][A-Z][A-Z]"



The Or condition seems to bust the whole thing, I tried And too but no go.
This works though:

Code:

Like "[A-Z][A-Z][0-9][0-9][0-9][A-Z][A-Z]"

View 1 Replies View Related

SQL Regex Replace How-To?

Feb 21, 2007

Anyone find any good readings on how to do a regular expression to replace text?

Basically trying to figure out how to replace text in columns (replace quotes " with the word inches. so 12" will be 12 inches)

View 5 Replies View Related

Regex In Mssql ?

Nov 20, 2007

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?

thanks.

View 2 Replies View Related

Regex For Dtexec /ConsoleLog

Mar 12, 2008

This is a long shot but I'm hoping someone from the SSIS team can help.

Do you happen to have a regular expression that checks validity of the value supplied to the /ConsoleLog option of dtexec?

I suspect the answer is no but I thought I'd ask anyway. I figure you guys must have had to solve this at some point when you originally wrote dtexec.

Thanls
Jamie

[Microsoft follow-up]

View 3 Replies View Related

GPL RegEx Source Component

Apr 6, 2006

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.

Cheers...Geof

View 2 Replies View Related

Help With Query (control Structure &#043; Regex)

Mar 10, 2008

Hi,

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.

Any help is much appreicated!!

Thanks again,
mike123




CREATE PROCEDURE [dbo].[select_google_referrers_groupByQueryDate_OrderByQueryDate]

(
@numDays int,
@landingPage varchar(50) = NULL
)

AS SET NOCOUNT ON

SELECT CONVERT(varchar(10),GO.queryDate,112) as referDate,

COUNT(GO.queryID) AS TotalReferrers FROM tblgoogle_referrerDetails GO

WHERE DateDiff(dd, GO.queryDate, GetDate()) < @numDays and landingpage like '/products%'

GROUP BY CONVERT(varchar(10),GO.queryDate,112)

ORDER BY referDate DESC
GO

View 11 Replies View Related

Regex Parser Text Field

Jul 20, 2005

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

View 1 Replies View Related

Transact SQL :: How To Make Phone Number In A Regex Pattern

Oct 27, 2015

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

[code]....

View 6 Replies View Related

Simple Text Processing E.g. Regex Search And Replace

Aug 8, 2006

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?

Thanks!

View 13 Replies View Related

Send Mail Task Problem Using A Combination Of ForEach Loop, Recordset Destination, Execute SQL Task And Script Task

Jun 21, 2007

OK. I give up and need help. Hopefully it's something minor ...



I have a dataflow which returns email addresses to a recordset.

I pass this recordset into a ForEachLoop configuring the enumerator as (Foreach ADO Enumerator). I also map the email address as a variable with index 0.



I then have a Execute SQL task which receives this email address as a varchar variable (parameter 0) which I then use in my SQL command to limit the rows returned. I have commented out the where clause and returned all rows regardless of email address to try to troubleshoot this problem. In either event, I then use a resultset to store the query result of type object and result name 0.



I then pass this resultset into a script variable to start parsing the sql rows returned as type object. ( I assume this is the correct way to do this from other prior posts ...).



The script appears to throw an exception at the following line. I assume it's because I'm either not passing in the values properly or the query doesn't return anything. However, I am certain the query works as it executes just fine at the command prompt.



Try

ds = CType(Dts.Variables("VP_EMAIL_RESULTS_RS").Value, DataSet)



My intent is to email the query results to each email address with the following type of data by passing the parsed data from the script to a send mail task. Email works fine and sends out messages but the content is empty. I pass the parsed data as string values to the messagesource and define the messagesourcetype as a variable in the mail task.



part number leadtime

x 5

y 9

....



Does anyone have any idea what I might be doing wrong?

thanks

John

View 5 Replies View Related

Integration Services :: Stored Procedure In Execute Task Fails But Task Does Not Fail

Jul 1, 2015

I'm using SSIS in Visual Studio 2012. My Execute SQL Task calls a Stored Procedure where I have a TRY-CATCH. Last week there was a problem and the CATCH was executed and logged an error to my error table, but for some reason the Execute SQL Task didn't fail. Is there a setting to make the Execute SQL Task fail when an SP encounters a failure?

View 3 Replies View Related

Error: The Task With The Name Data Flow Task And The Creation Name DTS.Pipeline.1 Is Not Registered For Use On This Computer

May 4, 2006



Hi,

I am trying to create a simple BI Application for SSIS. In Visual Studio 2005 I just get a Data Flow Task from the toolbar and add it to the project. When I double click it I get the following error:

The task with the name "Data Flow Task" and the creation name "DTS.Pipeline.1" is not registered for use on this computer.

Then when I try to delete it it gives this other error:

Cannot remove the specified item because it was not found in the specified Collection.

I am creating this application in an administrator account in this computer, so I doubt the problem is related to permissions. I am running SQL Server 2005 and Visual Studio 2005 in WinXP Tablet PC Edition.

Any suggestions why this is happening and how to fix it?

View 17 Replies View Related

SSIS Task Transfer SQL Server Objects Task And Default Constraints On Tables

Feb 21, 2008



I am using the "Transfer SQL Server Objects Task" to copy some tables from database A to database B including data.

The tables, primary key constraints, Foreign key, data and all transfers nicely except for "DEFAULT CONSTRAINTS" on the tables.

I have failed to find any option in the "Transfer SQL Server Objects Task" task to explicitly say "copy default constraints". So I guess logically it should happen automatically but it doesn't. I hope it is not a bug :-)

Any option anyone knows will help.

Thanks.

View 17 Replies View Related

Compare Performance (Execute SQL Task Insert And Data Flow Task)

Mar 12, 2008



I am using SQL 2005 SSIS. I am joining several large tables and then the move result into another table in the same database.

I would like know which method is faster:


Use Execute SQL Task to insert the result set to the target table

Use the Data Flow Task to insert the result set to the target table. (Use OLE DB source to execute SQL command and then use the SQL destination)
Could you tell me why then other is slower?

Thanks.

View 7 Replies View Related

Execute SQL Task – Output Parameter On Stored Procedure Causes Task To Fail.

Dec 2, 2005

I have a SQL Task that calls a stored procedure and returns an output parameter.  The task fails with error "Value does not fall within the expected range."   The Stored Procedure is defined as follows: Create Procedure [dbo].[TestOutputParms]             @InParm INT ,             @OutParm INT OUTPUT as Set @OutParm  = @InParm + 5   The task uses an OLEDB connection and has a source type of Direct Input.  The SQL Statement is Exec TestOutputParms 7, ? output    The parameter mapping is: Variable Name Direction Data Type Parameter Name User::OutParm Output LONG @OutParm  

View 7 Replies View Related

Writing Full Result Set From Execute SQL Task Into A File Using Script Task

Mar 28, 2007

In the Control flow tab, I have an Execute SQL Task that outputs full Result set into a variable of an object type. Now how can I write the contents of the Full Result Set into a text file using Script Task. I also want to format the following way while I output into a file:

Column Name 1 : Column Value

Column Name 2: Column Value and so on

I tried writing the contents of the Object Variable into a file, but the file had an output of single word: System.__ComObject.




Code for Writing the Full Result Set into a Text File

Dim RSsqloutput as String = Dts.Variables("objVariable").Value.ToString

Dim strVal as String = "File completed on " & Now() & vbCrLf & "------------------------------------------------------" & vbCrLf

oLogFile.WriteAllText("C:MyFile.txt", strValue)

oLogFile.WriteAllText("C:MyFile.txt", rsSQLOutput)



I went through this link that explains how to write XML Result Set into a File, But this doesn't help as it writes in XML format.

Would you please give me a hint of code how I can go upon.





View 7 Replies View Related

SSIS (Integration Services) Transfer SQL Server Objects Task: This Task Can Not Participate In A Transaction

Feb 1, 2007

In short, does the €œTransfer SQL Server Objects Task€? support distributed transactions?

In trying to use a €œTransfer SQL Server Objects Task€? in a container using a transaction on the container. The task is set to support the transaction. It is setup to copy table data from several tables from a non-domain server (sql server 2000) to a domain-based server (sql server 2005). I get an error stating, €œThis task can not participate in a transaction€?.

I am wondering if it means exactly what it says €“ this task in SSIS can€™t participate at all. Or does it mean that it won€™t in this scenario for some reason. I attempted a simple copy of data from mssql 2005 to mssql 2005 (same server) and the task still failed). MSDTC appears to be running properly on my machine and such (I can do a simple distributed transaction across linked server to the 2000 server in Query Analyzer (QA)). Also, MSDTC appears to be working on both servers with distributed transaction query tests in QA.

Here€™s the error info€¦

SSIS package "Development BusinessContacts and Products Migration.dtsx" starting.
Information: 0x4001100A at Copy BusinessContacts Data: Starting distributed transaction for this container.
Error: 0xC002F319 at Copy BusinessContacts database table data 1, Transfer SQL Server Objects Task: This task can not participate in a transaction.
Task failed: Copy BusinessContacts database table data 1
Information: 0x4001100C at Copy BusinessContacts database table data 1: Aborting the current distributed transaction.
Information: 0x4001100C at Copy BusinessContacts Data: Aborting the current distributed transaction.
SSIS package "Development BusinessContacts and Products Migration.dtsx" finished: Failure.
The program '[4700] Development BusinessContacts and Products Migration.dtsx: DTS' has exited with code 0 (0x0).

View 9 Replies View Related

How To Fetch The Recrods From MS Access And Using It In Script Task Using Control Flow Tools(Execute SQL Task)

Jun 14, 2006

Hi

I have an application like fetching records from the DataBase(MS Access 2000) and results i have to use in Script Task. At present i have used the record fetching query,connection string in Script itself. I would like to use in Independently. Is there any Tools like (Control Flow Tools like Execute SQL Task) are there to fetch the result set from Acccess and can use the fetching results in Script Task....

Thanks & Regards

Deepu M.I

View 5 Replies View Related

Can A Result Set From SQL Script Task Be Used As A Source For Data Flow Task?

Oct 2, 2007

I have a stored procedure that is executed via a sql script task that returns a full result set. I map this result set to a variable or object type. Is there a way to use this variable as a data source in a subsequent data flow task?

A.

View 14 Replies View Related

How To Enable Or Disable A Task Programmatically Using Script Task

Mar 6, 2006

I have made one package which extracts data from the source does transformation and submits the data to destination. Subsequently it also updates the required control files.

Now I want to add a functionality :

If the package is executed again it should check the status of previous execution in control file if success mark all tasks disable and stop

if failure mark all tasks at enable and start extracting data and continue further with execution.

I was able to attain similar functionality in SQL Server 2000 using activeX script. What code do I need to write as a part of Script Task in order to attain above functionality.

View 3 Replies View Related

Execute DTS 2000 Package Task. Mischievous Task??

Sep 21, 2006



Hi everyone,

For first time I'm testing this task and surprisingly, when I try "Edit Package" option:


1)The DTS host failed to load or save the package properly
2)The selected package cannot be opened
3)Error HRESULT E_FAIL has been returned from a call to a COM component

But after these messages you can see all the tasks but they haven't name!!

It seem as if RCW mechanism has failed between managed and unmanaged coded-partially.

I don't dare to follow doing more stuff, I don't know if that package is well-loaded or not from there. ?¿

Any guidance or idea about this?

View 5 Replies View Related

How Do I Start A Transaction :-Dataflow Task + Excute SQL Task

Mar 7, 2007

1 :Control Flow Excute SQL task: Truncate Table

2: Dataflow Task: Datareader--Script componant--OLE DB Destination (SQL Server 2005--a single table --always around 600,000 rows)

How do I set up a transaction where if there is a failure the Truncate Table command will roll back---and the OLE Destination (A single SQL Server table) will be left the same as before the load started.

Another question with that volume of data --600,000 rows will a truncate table be pratical in a transaction

Any ides welcome

thanks in advance

David

View 3 Replies View Related

File Watcher Task (Konessans) Vs For Each Loop Task

Dec 6, 2007



HI, I need to trigger some packages upon existance of specific files in a particular directory. Sound lkike the file watcher task (from SQLIS) would do the job but I am wondering what is the difference of using this tool instead of a for each loop container. I mean, If a file exists in a directory, the for each loop container will detect it. Since the file watcher is not a service, the package containing it needs to ne scheduled on a regular basis for the filewatcher to detect the file, right? So, a for each loop container would do the job? So, waht wouldbe the advantage of using the file watcher task?

Thank you,
Ccote

View 11 Replies View Related

New 2005 SSIS Task: File Properties Task

Nov 7, 2007

A common issue that I run across with clients is they want only want to process a file if it's finished transmitting to the server. This SQL Server 2005 task reads the properties of a file and writes the values to a series of variables. For example, you can use this task to determine if the file is in use (still be uploaded or written to) and then conditionally run the Data Flow task to load the file if it's not being used. You can also use it to determine when the file was created in order to determine if it must be archived.

http://www.pragmaticworks.com/filepropertiestask.htm

View 5 Replies View Related

Why DataFlow Task Takes More To Complete Than Doing The Same In Execute SQL Task

Jun 12, 2007

An Execute SQL task takes 1 min to run a statement "insert into Mytable select * from view_using_joins"

Output: 10,225 rows affected.



But a Dataflow task configured to fetch data from the same view_using_joins into MyTable takes hours to do the same.



Could you please explain why is it so ?



Thanks

Subhash Subramanyam







View 14 Replies View Related

Error Using Row Count Task In Data Flow Task

Dec 20, 2007

Hi,

I'm trying to get a record count out of a databse using OLE DB Source and row count tasks but keep getting an error. I set up a variable as int32 and select the variable name in the row count task and when I go to the Input Columns tab to select a field to count, it gives me this error:

Error at Data Flow Task[Row Count[505]]: The component "Row Count" (505) has forbidden the requested use of the input column with lineage ID 32.

I don't even know what this means?

thanks,

View 4 Replies View Related

Accessing Components And Task From Scripting Task

May 8, 2006

Hi, I have to researching of how to accesss package tasks and component using the SqlServer.Dts.Runtime class and so far, I havent found any solution. For example, if you package has a scriptiong task and a data flow task(<- which contains a data source component). Is it possible to use the scripting component to access the data source component in the data flow task and manipulate its properites like sqlcommand etc.

Emmanuel

View 5 Replies View Related

How Do You Get A Reference To The Task Host In An SSIS Task

Feb 26, 2008

I've created my own posting for this. The original post was here, I apologize: http://forums.microsoft.com/forums/ShowPost.aspx?PostID=2906512&SiteID=1

According to the poster it's not possible. But there has to be some way to do it? Reflection (don't know how)?


I need to get a reference to the task host in an SSIS Task component.

Basically the scenario is this:

I have a custom task I have created. However I would like to validate that the ExecValueVariable is infact a string variable during the validate event of the task. I know how to verify its a string variable. But I can't figure out how to read what the user selected (such as User::Myvariable). The only way I've been able to figure out how to do it, but it only works if you open my custom task UI.

What I did is this:

I've implemented IDtsTaskUI and during the initialize section I wrote:

Sub Initialize(ByVal taskHost As TaskHost, ByVal serviceProvider As IServiceProvider) Implements IDtsTaskUI.Initialize
' Store the TaskHost of the task.
Me.taskHostValue = taskHost
Dim myTask As CustomTask= CType(taskHost.InnerObject, CustomTask)
myTask.myTaskHost = taskHost
End Sub

My Task is named: CustomTask. I have a public variable in my task as follows:

Public NotInheritable Class CustomTask
Inherits Task
Implements IDTSComponentPersist
Public myTaskHost As TaskHost = Nothing

Therefore I pass back the taskhost value to the CustomTask class, and voila I have it.

Problem is, this only works if the custom task calls the initialize method, and this only happens when you open the custom editor.

I then do the validation in my CustomTask class and it works fine, but myTaskHost is null/nothing until you actually open the custom task UI

How do I solve this?



View 10 Replies View Related

Recompile SQL Task With Data Flow Task

Feb 23, 2007

Hi,


I created a package with SQL 2005. The package gets the Access DB and then inserts it into SQL Server.

If I open the package in .NET, I can see the SQL Task and Data Flow Task. The SQL Task has a property sqlstatementsource, which has the necxessary SQL code to create the tables.

How can I tell the SQL Task to recompile the SQL code if I give it another DB name, because the tables differ and don't map in the Data Flow Task


Thanks

View 3 Replies View Related

How To Know What BRKR TASK (or Any Background Task For That Matter) Is Doing?

Apr 3, 2008

Sometimes we have some pretty serious CPU spikes and I would like to be able to pinpoint the exact issue. I have been able through the DMVs to associate a session with an operating system thread. That's great if I have a batch that's causing the problem with a non NULL sql_handle. However, how do I further narrow down what is going on with the background service broker tasks using the DMVs? Or am I just at the blind mercy of SQL Server at this point? What can I query to know what the heck is going on?

View 10 Replies View Related

The Task Transfer SQL Server Objects Task Cannot Run On This Edition Of Integration Services. It Requires Higher Level Edition.

Jun 23, 2006

Error code: 0xc0012024

Using "Integration Services Project" template in Business Intelligence Studio. Using platforms Visual Studio 2005 along with SQL Server 2005.

Getting the error while trying to execute package after loading it programmaticaly.

I've just one task "Transfer SQL Server Objects Task" on my Integration Services package. But when I try to execute it from VS 2005 project programmaticaly, it gives the above mentioned error.

The commands I use:

Package pkg = new Package();

pkg = a.LoadPackage(@"C:Documents and SettingsabcMy DocumentsVisual Studio 2005ProjectslSSISSSISPackage.dtsx", null, true);

DTSExecResult dResult = pkg.Execute();

The the error comes like: error: 0xc0012024 The task Transfer SQL Server Objects Task cannot run on this edition of Integration Services. It requires higher level edition.

Please help me.

Thanks in advance,

Bhupesh

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved