Home » SQL & PL/SQL » SQL & PL/SQL » Reg Spliting line using instr,substr and regexp (Oracle,10G,Windows 7)
Reg Spliting line using instr,substr and regexp [message #636583] Tue, 28 April 2015 09:36 Go to next message
gsaravanan
Messages: 16
Registered: April 2015
Location: chennai
Junior Member
Hi...
I have a one line like below, now i want to split this line and store into some variable ,

:20:STARTUMSE:25:10080000/1008546EXT:28C:00002/001:60F:C150409EUR51,12:61:1312031203CR25,56N087NONREF:86:?008ddrefd12345?200?21338243 78?2228-JAN-15?3010080000?31332904500?32dasfwgfwrgwrgghehhjjjyj?35Commerzbank:62F:C150409EUR0,00

i want to split as like below ,please help me urgently how to use any instr,substr and reg exp here and split.

:25:10080000/1008546EXT
:28C:00002/001
:61:1312031203CR25,56N087NONREF:
:62F:C150409EUR0,00
Re: Reg Spliting line using instr,substr and regexp [message #636584 is a reply to message #636583] Tue, 28 April 2015 09:43 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
Going to need a test case there and an explanation of the split rules and exclusions.
Re: Reg Spliting line using instr,substr and regexp [message #636585 is a reply to message #636583] Tue, 28 April 2015 09:46 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
gsaravanan wrote on Tue, 28 April 2015 07:36
Hi...
I have a one line like below, now i want to split this line and store into some variable ,

:20:STARTUMSE:25:10080000/1008546EXT:28C:00002/001:60F:C150409EUR51,12:61:1312031203CR25,56N087NONREF:86:?008ddrefd12345?200?21338243 78?2228-JAN-15?3010080000?31332904500?32dasfwgfwrgwrgghehhjjjyj?35Commerzbank:62F:C150409EUR0,00

i want to split as like below ,please help me urgently how to use any instr,substr and reg exp here and split.

:25:10080000/1008546EXT
:28C:00002/001
:61:1312031203CR25,56N087NONREF:
:62F:C150409EUR0,00



Text In & Text Out so why is Oracle DB involved?
Re: Reg Spliting line using instr,substr and regexp [message #636587 is a reply to message #636583] Tue, 28 April 2015 10:01 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Is your previous question related to this question? Is it in continuation? In none of your posts so far you have followed the forum guidelines. You didn't use code tags. Please read and follow the OraFAQ Forum Guide and How to use [code] tags, to enable us to help you.[/quote]

As others have stated, you need to explain the rules to split the string.

You could have a look at few examples here http://lalitkumarb.wordpress.com/2014/12/02/split-comma-delimited-string-into-rows-using-oracle-sql/
Re: Reg Spliting line using instr,substr and regexp [message #636592 is a reply to message #636587] Tue, 28 April 2015 13:23 Go to previous messageGo to next message
gsaravanan
Messages: 16
Registered: April 2015
Location: chennai
Junior Member
Hi yes this is related to previous question coding ,please help me on this.
Re: Reg Spliting line using instr,substr and regexp [message #636593 is a reply to message #636587] Tue, 28 April 2015 13:25 Go to previous messageGo to next message
gsaravanan
Messages: 16
Registered: April 2015
Location: chennai
Junior Member
Hi there is no specific rules here,I want to split then based on business logic I have to insert into table.
Re: Reg Spliting line using instr,substr and regexp [message #636594 is a reply to message #636593] Tue, 28 April 2015 13:41 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

So what is the business logic?

Previous Topic: While inserting record i got error ORA-00903: invalid table name
Next Topic: How do I pass a table name dynamically using execute immediate
Goto Forum:
  


Current Time: Fri Apr 26 04:16:08 CDT 2024