SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


RegEx Error SQL IS 2005


RegEx Error SQL IS 2005

Author
Message
Janie.Carlisle
Janie.Carlisle
SSC Veteran
SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)

Group: General Forum Members
Points: 233 Visits: 86
Here is sample data that is being converted from one "cleaned" field to multiple individual fields. One of these records converted perfectly. The other one caused the above error. I don't see any differences. HELP!!!!
352801 352802 | Y1 IR5061 08/13/2010 08/13/2010 8AL 0083637591 2.27 13601100 IR5061 9000009142 531 || 08/16/2010 08/13/2010 0.000 0 0 0.00 2.27 TPM2211 YM 2646 IC-TULSI RAM USD free goods 11-Aug 2010 9000009142 2646 |
352799 352800 | Y1 IR5061 08/13/2010 08/13/2010 8AL 0083637591 2.25 13601100 IR5061 9000009142 530 || 08/16/2010 08/13/2010 0.000 0 0 0.00 2.25 TPM2211 YM 2646 IC-TULSI RAM USD free goods 11-Aug 2010 9000009142 2646 |
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)SSC Guru (53K reputation)

Group: General Forum Members
Points: 53240 Visits: 21198
What component/expression is causing the error and what is the exact error?


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Janie.Carlisle
Janie.Carlisle
SSC Veteran
SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)SSC Veteran (233 reputation)

Group: General Forum Members
Points: 233 Visits: 86
Here is the complete error message.
Error Messages:

--------------------------------------------------

No match for regular expression; component fails.

--------------------------------------------------

SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Regex" (49) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.

--------------------------------------------------

SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0209029. There may be error messages posted before this with more information on why the thread has exited.

--------------------------------------------------

The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.

--------------------------------------------------

SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Get Pre-Staged" (2175) returned error code 0xC02020C4. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

--------------------------------------------------

SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited.

What the regex is doing is taking one large field (the sample records I sent) and parsing them down into multiple fields. Here is the expression.
(?<Start>.{3})(?<PostingKey>.{3})(?<ReasonCode>.{4})(?<Account>.{11})(?<BaselineDate>.{11})(?<NetDueDate>.{11})(?<Text>.{51})(?<RefKey2>.{13})(?<Amount>.{19})(?<GLAccount>.{11})(?<ProfitCenter>.{11})(?<RefKey1>.{13})(?<Assignment>.{51})(?<DocumentNumber>.{11})(?<LineItem>.{4})(?<DeadSpace>.{22})(?<Start2>.{3})(?<DocumentDate>.{11})(?<ClearingDate>.{11})(?<PostingDate>.{11})(?<BranchAccount>.{10})(?<DiscPercent1>.{7})(?<Days1>.{5})(?<Days2>.{5})(?<DiscountAmount>.{19})(?<DiscountBaseAmount>.{19})(?<UserName>.{13})(?<DocumentType>.{3})(?<CompanyCode>.{5})(?<Reference>.{17})(?<LocalCurrency>.{6})(?<DocumentHeaderText>.{51})(?<BusinessArea>.{5})(?<RefKey3>.{21})(?<InvoiceReference>.{11})(?<CreditControlArea>.{5})(?<ClearingDocument>.{10})(?<End>.*)


A huge problem is that the records aren't moved over in the parsed table in the same order they are in the cleaned records table. That makes it next to impossible to correctly identify the problem record. ARGHHHHH
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search