Split a column into multiple columns
HelloI have a phone of column with format "+ 91-(0120) - 2784819/2784562/2789456 '.
I need to break it into 5 columns
Postal code: + (91)
CityCode: 0120
Telephone1: 2784819
Telephone2: 2784562
Phone3: 2789456
Help, please
Try
with t as
(choose ' + 91-(0120) - 2784819/2784562/2789456 ' | ') Ph "/" double)
Select
SUBSTR (pH, 1, InStr(pH,')-', 1)) cntry,
Replace (substr (pH, 1, InStr(pH,')-', 1, 2)), substr (pH, 1, InStr(pH,')-', 1)) | ('-') city.
Replace (Replace (substr (pH, 1, InStr(pH,'/',1)), substr (pH, 1, InStr(pH,'-',1,2))),'/ ') numbers1.
Replace (Replace (substr (pH, 1, InStr(pH,'/',1,2)), substr (pH, 1, InStr(pH,'/',1))),'/ ') telephone2,.
Replace (Replace (substr (pH, 1, InStr(pH,'/',1,3)), substr (pH, 1, InStr(pH,'/',1,2))),'/ ') phone3
Of
t
Tags: Database
Similar Questions
-
How to split an image into multiple images
Hello
First of all sorry for my English is not my mother tongue...
I have several image (en. JPG or other common extensions) with a single image that i have support in photoshop.
My goal is to make multiple files (en. JPG or other) with a single file. But I want to keep some of my first image and erase other parts... like in my funny picture: I want to keep only the text and the esaer of other parts with lines.
Is this possible? If yes what is the procedure of the ? And I can them directly named?
It is to make flash cards and study...
All waiting for an answer, and thank you for giving me your time.
So, something like that?
If so, simply drag the crop on each section tool (type "C" on your keyboard to select the tool) then press enter or return, save money, cancel (Ctrl + Shift + Z), and then repeat the process.
-
How to split a file into multiple files
How can I separate a single PDF in separate page pdf file?
Hi scottb22552830,
You will need Acrobat free trial download Adobe Acrobat application | Acrobat Pro DC split split a PDF | Tutorials Adobe Acrobat DC. is not possible using free reader application.
Kind regards
Nicos -
Convert a single column into multiple lines
Hi people,
I have a task to display a single column into multiple lines (for use in LOV)
For Ex:
The column consistes of value such as 98,78,67,68,34,90. -It's a unique column values where none of the values can be ' number that is separated by commas
Then we must view it as
98
78
67
68
34
90
-under the number of lines (no lines can be ' do not number).
Thanks in advanceTry this...
SQL> ed Wrote file afiedt.buf 1 select regexp_substr('98,78,67,68,34,90', '[^,]+',1,level) Value 2 from dual 3* connect by level <= regexp_count('98,78,67,68,34,90',',') + 1 SQL> / VALUE ----------------- 98 78 67 68 34 90 6 rows selected.
Thank you!
-
How to split a string into several substrings parent using a delimiter
Hello
I am forced to split a string into several substrings parent using a delimiter.
And insert these substrings in variuou of the columns of a table in a row.
For example. The sting is: ABC * DEF * GHI * JKH *.
where ' *' is the separator.
Desired output:
Col1 Col2 Col3 Col4 Col5
------- -------- -------- ------- ---------
JKH GHI ABC DEF (null)
Could you please guide me how can I achieve this.
Thank you
Bogoss
Hello Salim,
Leave the thread for reference... got this excerpt:
with t as
(
Select "c: its: hgfd:1:23" Str
)
Select
REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 1, null, 1) col1
, REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 2, null, 1) col2
, REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 3, null, 1) col3
, REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 4, null, 1) col4
, REGEXP_SUBSTR (str, ' ([^:] *)(:|$)', 1, 5, null, 1) col5
t;
This code snippet works well, but for the fixed columns. Here are 5 predefined columns.
But I need to have a logic that I can browse the string any No.. sometimes.
For example. If I get 3 secondary channels of the parent chain... I need to insert into 3 columns.
And if I get 6 strings under... I need to insert into 6 columns.
Could you please help me develop a logic like that.
I use Oracle database 10g.
And the data are currently being collected on external table... but I can store in a variable or a column of a database table.
Thank you
Bogoss
-
splits the string into 3 parts
Hello
I have a requirement to split the string into 3 different room example inf.ethz.ch should be subdivided into inf ethz ch in 3 different column
We have table called email within this column contains all identification of email we need to divide email with dot (.) in different columns and display please suggest how to implement in the query
Thank you
Sudhir
Use REGEXP_SUBSTR:
SQL > with t as (select ' inf.ethz.ch' double txt)
2 Select regexp_substr (txt,'[^.] +') part_1,.
3 regexp_substr (txt,'[^.] +', 1, 2) part_2,.
4 regexp_substr (txt,'[^.] +' 1, 3) part_3
5 t
6.BY PARTY PA
--- ---- --
INF ethz chSQL >
Or you can use SUBSTR + Instr.
SY.
-
Simple question: how to divide the string into multiple lines concatenated?
Hi people,
Maybe it's an easy question.
How to split a string that is concatenated into multiple lines by using the SQL query?
ENTRY:
Delimiter = ', '.select 'AAA,BBB,CC,DDDD' as data from dual
Expected results:
I'm looking for something nice to feature "an opposite to «sys_connect_by_path»»data ------------ AAA BBB CCC DDDD
Thank you
Tomaswith t as (select 'aaaa,,bbbb,cccc,dddd,eeee,ffff' as txt from dual) -- end of sample data select REGEXP_SUBSTR (txt, '[^,]+', 1, level) from t connect by level <= length(regexp_replace(txt,'[^,]*'))+1 REGEXP_SUBSTR(TXT,'[^,]+',1,LE ------------------------------ aaaa bbbb cccc dddd eeee ffff
-
Divide a document into multiple records (lines)
I use ODI to move the data from the source on the target system. Both are Oracle. In the source system, I have a file I need to split into multiple records or lines in the system target according to certain rules. How can I achieve this in ODI. Please explainHello
What a day I understood your example
I have a few questions...
1. you have information about the patient in a table 1 source.
2. How do you identify for patient X you need to create 5 rows. you store this information in the table seprate or how...3. If you have this information in separate tables... a simple cross join in ODI, you should get the result...
Or give additional information with an example... it would be great...
Thank you
-
Oracle regular expressions - splits the string into words for
Hello
Nice day!
My requirement is to split the string into words.
So I need to identify the new line character and the semicolon (;), comma and space like terminator for string entry.
Please note that I am currently embedded blank and the comma as separator, as shown below.
Select regexp_substr('test)
TO
string in words, "([^, [: blanc:]] +) (', 1, 1) double;"How to integrate the semicolons and line break characters in regular expression Oracle?
Please notify.
Thanks and greetings
Sree
This has nothing to do with REGEXP. Is SQL * more parser does not not a semicolon at the end of the line:
SQL > select ' testto, mm\;
ERROR:
ORA-01756: city not properly finished chainSQL >
Just break the chain:
SQL > select regexp_substr ('testto, mm\;' |) '
2 string into words
3 \w+',1,level ',') of double
4. connect by level<= regexp_count('testto,mm\;'="" ||="">=>
5 string in words
6 ','\w+')
7.REGEXP_SUBSTR ('TESTTO, MM\;' |') STRINGIN
--------------------------------------
Testto
mm
string
in
WordsSQL >
Or modify SQL * more the character of endpoints:
SQL > set sqlterm.
SQL > select regexp_substr ('testto, mm\;)
2 string into words
3 \w+',1,level ',') of double
4. connect by level<=>=>
5 string in words
6 ','\w+')
7.REGEXP_SUBSTR ('TESTTO, MM\;) STRINGINTOWO
--------------------------------------
Testto
mm
string
in
WordsSQL >
SY.
-
A script that will count the total number of pages into multiple PDF files in a batch file?
Is there a script I can use ExtendScript Toolkit that will count the total number of pages into multiple PDF files in a batch file?
In another discussion I showed a JavaScript that you can use to write the number of pages to the console in a batch sequence. You would do exactly the same thing in Action, so the action would consist of a simple JavaScript (more tools > run JavaScript) which includes the code.
-
I implemented the Oracle text search in my database. Now I have this query
Select ctx_thes.syn ('RED', 'MY_THESAURUS') of double;
the output is displayed as
{RED} | {MIXTURE OF RED} | {TABLE RED} | {RED}
and I want to get the words in separate lines, i.e.
Red
Mixture of Red
Red table
Red wine
How to split the string into lines?
SELECT * FROM ( SELECT DISTINCT REGEXP_SUBSTR ('{RED}|{RED BLEND}|{RED TABLE}|{RED WINE}', '({)([A-Z]+ *[A-Z]*)(})', 1, LEVEL, 'i', 2) val FROM DUAL CONNECT BY LEVEL <= REGEXP_COUNT ( '{RED}|{RED BLEND}|{RED TABLE}|{RED WINE}', '|') + 1) WHERE val IS NOT NULL;
-
Hello. I have a 57 min mts video I would like to cut in several short videos. simple, no doubt. How can I split this video into sections?
Press F1 and type of subitems.
-
Separate an object into multiple objects w / Pen
I am looking for a way to draw a single object, solid and then divide the object into multiple objects by using the pen tool. no other objects.
Ex: Draw a solid cirlce, use the pen tool to draw lines on this circle (visually by creating different forms), then [be] with the original circle and lines drawn in pen to create the new objects/shapes.
I've done this before by placing other OBJECTS on the original object and using the fracture or pathfinder trim switches, but using other forms (even online) has its limits.
Any ideas?
CS6
Dan,
We are not just talking object > path > divide objects below (when the drawn Pen path reaches or exceeds the paths below), are we?
-
How to split a PDF into smaller files using Acrobat XI
How to split a PDF into smaller files using Acrobat XI?
Hi laforcej
Open the PDF in Acrobat...
Go to tools-> Pages-> extract
Now, select the Page number, you want to extract and save
-
splits the string into documents
Hello
I did a query (see regexp) that split a string into records. The problem with the query is the separate in the subquery. Otherwise, it returns millions of records where I expect less than a thousand.
Meanwhile, I found an other solution (see xmlsequence), but this statement returns the message "ORA-03113: end of file on the communication channel.
Please advice.
regexp:
xmlsequence:SELECT smp.sample_id FROM ( SELECT sa.sample_id, sau.u_box_code, sau.u_box_position FROM lims_sys.sdg sd, lims_sys.sdg_user sdu, lims_sys.sample sa, lims_sys.sample_user sau WHERE sd.sdg_id = sdu.sdg_id AND sd.sdg_id = sa.sdg_id AND sa.sample_id = sau.sample_id AND sau.u_padded_out = 'F' AND sdu.u_client_type = decode('#Client#','-1',sdu.u_client_type,'#Client#') AND sdu.u_crop_group = decode('#Crop#','-1',sdu.u_crop_group,'#Crop#') AND sdu.u_year_of_sample_delivery = decode('#Year#',-1,sdu.u_year_of_sample_delivery,'#Year#') AND sdu.u_week_of_processing = decode('#Week#',-1,sdu.u_week_of_processing,'#Week#') AND sd.status IN ('V','P','C') ) smp, ( SELECT distinct box_code, regexp_substr(box_pos,'[^,]+',1,level) box_pos FROM ( SELECT p.name box_code, substr(p.description,instr(p.description, 'NP=') + 3) box_pos FROM lims_sys.plate_template pt, lims_sys.plate p, lims_sys.plate_user pu WHERE pt.plate_template_id = p.plate_template_id AND p.plate_id = pu.plate_id AND pt.name = 'Box96' AND p.status IN ('V','P','C') AND p.description like '%NP=%' AND pu.u_client_type = decode('#Client#','-1',pu.u_client_type,'#Client#') AND pu.u_crop_group = decode('#Crop#','-1',pu.u_crop_group,'#Crop#') AND pu.u_year = decode('#Year#',-1,pu.u_year,'#Year#') AND pu.u_week = decode('#Week#',-1,pu.u_week,'#Week#') ) connect by level <= length(box_pos) - length(replace(box_pos,',')) + 1 ) box WHERE smp.u_box_code = box.box_code AND smp.u_box_position = box.box_pos
SELECT smp.sample_id FROM ( SELECT sa.sample_id, sau.u_box_code, sau.u_box_position FROM lims_sys.sdg sd, lims_sys.sdg_user sdu, lims_sys.sample sa, lims_sys.sample_user sau WHERE sd.sdg_id = sdu.sdg_id AND sd.sdg_id = sa.sdg_id AND sa.sample_id = sau.sample_id AND sau.u_padded_out = 'F' AND sdu.u_client_type = decode('#Client#','-1',sdu.u_client_type,'#Client#') AND sdu.u_crop_group = decode('#Crop#','-1',sdu.u_crop_group,'#Crop#') AND sdu.u_year_of_sample_delivery = decode('#Year#',-1,sdu.u_year_of_sample_delivery,'#Year#') AND sdu.u_week_of_processing = decode('#Week#',-1,sdu.u_week_of_processing,'#Week#') AND sd.status IN ('V','P','C') ) smp, ( SELECT box_code, trim(x.column_value.extract('e/text()')) box_pos FROM ( SELECT p.name box_code, substr(p.description,instr(p.description, 'NP=') + 3) box_pos FROM lims_sys.plate_template pt, lims_sys.plate p, lims_sys.plate_user pu WHERE pt.plate_template_id = p.plate_template_id AND p.plate_id = pu.plate_id AND pt.name = 'Box96' AND p.status IN ('V','P','C') AND p.description like '%NP=%' AND pu.u_client_type = decode('#Client#','-1',pu.u_client_type,'#Client#') AND pu.u_crop_group = decode('#Crop#','-1',pu.u_crop_group,'#Crop#') AND pu.u_year = decode('#Year#',-1,pu.u_year,'#Year#') AND pu.u_week = decode('#Week#',-1,pu.u_week,'#Week#') ) t, table (xmlsequence(xmltype('<e><e>' || replace(t.box_pos,',','</e><e>')|| '</e></e>').extract('e/e'))) x ) box WHERE smp.u_box_code = box.box_code
Hello
When 'LEVEL '.<= x"="" is="" the="" only="" connect="" by="" condition,="" then="" you="" should="" be="" using="" a="" table="" that="" has="" only="" one="" row,="" like="">=>
You can generate a Table of counters (a result set, in fact) who has all the integers that you need and then join one.
The next thread is an example:
I don't don't want to mark in plsql
Maybe you are looking for
-
How to remove the flashing orange in the taskbar in the rempte Deskbar
original title: orange flashing on the taskbar I have 2 monitors and I have a powerpoint running on a remote desktop connection on my 2nd screen all day and I can still work normally on the primary monitor. However, the remote desktop bar on the task
-
Strange problem with S12 ION HDMI
I had my S12 ION yesterday and he enjoyed so far. However, the problem with the HDMI is irritating me I connected the S12 to my Samsung 40 inch TV (Samsung LN40B630) brought new and found that, in certain areas of the screen, there are a few blinkin
-
I have a DeskJet 3050 j610 series printer. I want to print from my iphone 4S and also my ipad. This printer is able to do? Thank you.
-
Hello!I need to perform these tasks:(1) turn off the virtual machine(2) change persistent hard Independent DIS3 - not independent(3) after some time, check if the virtual machine has a snapshot(4) if there is no independent rear instant play(5) power
-
Acrobat Pro 11.0.10 does not allow to convert me or batch convert MS Word to PDF files
I installed the latest version of Adobe Acrobat Pro for Windows (11.0.10) as a trial version.When I convert a file Menu file / create... PDF from file, a dialog box appears.In the list there is no mention of MS Word (.doc, docx) files anywhere in th