Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

RegEx Error SQL IS 2005 Expand / Collapse
Author
Message
Posted Monday, August 23, 2010 7:08 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, December 11, 2013 1:40 PM
Points: 43, 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 |
Post #973415
Posted Monday, August 23, 2010 7:18 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 1:50 PM
Points: 4,828, Visits: 11,179
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.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #973423
Posted Monday, August 23, 2010 7:47 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, December 11, 2013 1:40 PM
Points: 43, 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

Post #973435
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse