How to get these substrings based on the input string
Hi friendsI want the substring entered the string
the chain is something like this: 1234,3653,7684,3254,8777,987,234
now, I want to
the substrings between commas
can someone help me with this pls
in the first substring I need 1234
in the second, I need 3653...
so on until the end...
regardless of the channel is to the last
pls help
Hello
You can do something like this:
SELECT txt
, REGEXP_SUBSTR (txt, '[^,]+', 1, 1) AS part_1
, REGEXP_SUBSTR (txt, '[^,]+', 1, 2) AS part_2
, REGEXP_SUBSTR (txt, '[^,]+', 1, 3) AS part_3
-- ...
FROM table_x
;
If there are less than n parts, then the technique above will not raise an error; It will just return null for part_n.
I hope that answers your question.
If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
Explain how you get these results from these data.
What you want if the entry is like this.
{code}
"foo, bar".
{code}
? You want to treat this as 2 pieces ('bar' is the 2nd) or a 3 s (the 2nd is NULL, and 'bar' is the 3rd)? Include examples in your sample data and results.
Always tell what version of Oracle you are using.
Tags: Database
Similar Questions
-
DOES ANYONE KNOW HOW TO GET THESE IDIOTS ON THE PHONE?
DOES ANYONE KNOW HOW TO GET THESE IDIOTS ON THE PHONE
Salvation of barracks,
We will probably address your issue and would try our best to solve this problem, but we ask to use professional words so that we can help you.
I beg of you please explain about this, if possible we would guide you with the steps detailed here only.
In case you want to connect with the Adobe support team, you might check out the following link.
http://helpx.Adobe.com/x-productkb/global/Service1.html
Please click on the blue button "Still need help" to connect with one of the Adobe Executive.
Concerning
Sukrit diallo
-
How to create a document based on the name of a file in the file system?
Hello
With lots of photos, I like to have a database to collect information on these photos.
First question is how to generate a record based on a file in the file system?
for example, the images are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg".
now, I want to create folders with as one of the attributes of the name of the image (not the image itself). How to create these records (based on information from line-telephony). that is the number of records must be the same as the number of photos.
any suggestions?
any response will be appreciated.
LeoLink to create the directory
http://www.adp-GmbH.ch/ora/SQL/create_directory.html
You can create a list of files in the directory and read the list of files in this directory.
[Documentation UTL_FILE | http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
[Solution using Java | http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:439619916584]
SS
-
How to get back my data for the health and the watch Apps once I've restored my phone?
How to get back my data for the health and the watch Apps once I've restored my phone?
From the backup, you're going to be restoration.
If you back up to iTunes, make sure that it is an encrypted backup.
-
How to get to play or delete the Xvid codec to play? Movies in AVI format, I converted it to WMP, but he won't play again
No guarantee but maybe you need the XviD Codec.
(FWIW... it's always a good idea to create a system)
Restore point before installing software or updates)XviD Codec
http://www.xvidmovies.com/codec/ -
How to replace filtering engine based on the Windows Component?
HI - how to replace filtering engine based on the Windows Component?
See the link below. This fix is well worth trying, but if your system has been damaged by malicious programs such as Sirefef there may be more issues involved.
blogs.technet.com/b/asiasupp/archive/2011/12/27/error-code-0x80070424-with-Windows-Firewall-and-quot-base-filtering-engine-service-quot-not-available-in-services-database-list.aspx
-
How to get distinct records by using the ListAgg OBIEE report function?
Hi all
I get a correct result as mentioned below. But I don't see duplicates in my result here, in my example, I get duplicate for the name of the employee 'Pat '. So how to get Distinct values by using the LISTAGG function?
Data set of sample with the Department and its employees
Service employee
---------- ----------
Marketing Michael
Pat of marketing
Pat of marketing
Pat of marketing
Purchase of Den
Purchase of Alexander
Purchase of Shelli
Purchase of Sigal
Guy of purchase
Purchase of Karen
Using the ListAgg function, we can convert it to:
Employees of the Department
----------- -------------------------------------
Marketing of Pat, Pat, Pat, Michael
Purchase of Sigal, Shelli, Karen, Guy, Den, Alexander
I tried a lot of things, but I'm not able to understand how exactly this can be achieved, if anyone has any idea or suggestions please do share, thanks in advance.
After much research, I found the solution & I want to share what he finds very useful, we can create SQL logic in the Advanced tab, as below and after you click Rescan, and then you will get your desired results.
SELECT saw_0, Evaluate_Aggr T1.dept ("ListAgg(%1,'' & '') intra group (about 1%)") ("as long as VarChar (1000), T1.emp) saw_1 FROM)
SELECT 'emp_dept '. "the Department dept,
'emp_dept '. "' employee ' emp
IN THE "DOMAIN".
GROUP BY dept, emp
) T1 GROUP FROM T1.dept ORDER BY saw_0
Also note here that we have good anti-aliasing for columns parent (ex: saw_0, saw_1), another by mistake oracle bi server.
-
How to get Camera Raw to recognize the new Nikon D500 camera raw files?
How to get Camera Raw to recognize the new Nikon D500 camera raw files?
Devices supported by Adobe Camera Raw
The D500 has been supported since camera 9.5 Raw which is only compatible with versions of Photoshop CS6 and Cloud.
What version of Photoshop are you running?
-
How to get audio to play on the timeline by rubbing through
How to get audio to play on the timeline during the treatment, the clip is not cut, clip does not display an audio wave, looked through the help did not answer. When the clip is imported without options rise so uncertain where the issue is, any help is greatly appreciated, ty
There is an option in the Preferences / Audio: audio playback while rubbing.
-
How to create a report based on the item selected from the list of selection?
Hello
I created a tables_LOV based on:
Select table_name table_name user_tab_cols r, d
where column_name like '% _type % '.
Then I created a ListOfTables page element, display in a selection list and pointing to tables_LOV.
I run the page, and I can choose the table I want in the drop-down list.
How to create a report based on the selected element? (ex: select * from selected_table)
Thanks in advance
Salah
Hi Salah,
Allright, take a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
I think that simulates what you are trying to accomplish. I've implemented the simplest method I could think of.
The report is based on a collection of apex. If you are not familiar with this, you should study the documentation: APEX_COLLECTION
To recreate my example, you should:
(1) create a report (interactive) on your collection
SELECT * FROM APEX_collections WHERE collection_name = 'MY_COLLECTION'
(2) create a selection list page_item for the tables that you want to display (in my case, this is called "P38_TABLES")
(3) create a dynamic action that triggers on the evolution of your selection list page_item. Dynamic action must be a parade of PL/SQL procedure the following code:
declare l_query varchar2(4000); begin l_query := 'select * from '||:P38_TABLES; if apex_collection.collection_exists ( p_collection_name => 'MY_COLLECTION' ) then apex_collection.delete_collection ( p_collection_name => 'MY_COLLECTION' ); end if; apex_collection.create_collection_from_query ( p_collection_name => 'MY_COLLECTION' , p_query => l_query ); end;
Make sure that you add your page_item 'Page to send items' section.
(4) add a real extra action that makes an update of the report area.
Here are two photos describing the da:
http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA1.PNG
http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA2.PNG
Good luck and greetings,
Vincent
-
Have on current PC, Win 7 64 bit CS5; How to get *.exe to transfer to the new computer after removal of old?
https://helpx.Adobe.com/Creative-Suite/KB/CS5-product-downloads.html
-
How can getting error Code U44M1P7 during the upgrade, I fix?
How can getting error Code U44M1P7 during the upgrade, I fix?
Update product that you are trying to install?
Is it compared to the creative or perpetual clouds?
Please check following if you have creative clouds.
http://helpx.Adobe.com/Creative-Suite/KB/error-u44m1p7-installing-updates-CCM.html
-
How to find these different namespaces in the schema?
Hello
I heard that this schema contains different namespaces. How to find these different namespaces in the schema?
I checked with this, but it is throwing "table or view does not exist.
Select the namespace of v$ librarycache.
Thank you
PraveenAre you referring to this? From the reference manual of the SQL language under the schema object names and qualifiers
7. part of a namespace, no two objects can have the same name.
The following schema objects share a namespace:
Tables
Display
Sequences
Private synonyms
Autonomous procedures
Autonomous stored functions
Packages
Materialized views
User-defined typesEach of the following schema objects has its own namespace:
Index
Constraints
Clusters
Database triggers
Private database links
DimensionsBecause tables and views are in the same namespace, a table and a view in the same schema cannot have the same name. However, the tables and indexes are in different namespaces. Therefore, a table and an index in the same schema may have the same name.
Each schema in the database has its own namespaces for objects that it contains. This means, for example, two tables in different schemas are in different namespaces and can have the same name.
Each of the following schema objects also have its own namespace:
User roles
Public synonyms
Links to public database
Storage spaces
Profiles of school boards
The files (PFILEs) settings and server settings (SPFILEs) filesBecause objects in these namespaces do not appear in the drawings, these namespaces cover the entire base.
That's why you can do:
SQL> create table t (id number, descr varchar2(10)); Table created. SQL> alter table t add constraint t check (mod(id,2) = 0); Table altered. SQL> create index t on t(id); Index created. SQL> create trigger t 2 before update on t 3 begin 4 dbms_output.put_line('T Trigger'); 5 end; 6 / Trigger created.
but not:
SQL> create view t as select * from t; create view t as select * from t * ERROR at line 1: ORA-00955: name is already used by an existing object
or
SQL> create procedure t 2 begin 3 null; 4 end; 5 / create procedure t * ERROR at line 1: ORA-00955: name is already used by an existing object
John
-
date format picture ends before converting all of the input string
In the following query, I get the error: ORA-01830: date format picture ends before converting all of the input string
Select sum (e.gl_fig) in the rm_gl e where e.as_on_dt < = trunc (to_date('31-Nov-2011'), 'Q')-1Hello
Moreover, how many days are there in November? It IS 30 or 31?
Please change from 31-Nov-2011 to November 30, 2011, then it works.
select sum(e.gl_fig) from rm_gl e where e.as_on_dt <= trunc(to_date('30-Nov-2011', 'DD-MON-YYYY'),'Q')- 1
-
original title: windows live suit
When I try to open e-mail files a small box opens with the setting or the input string was not good format
Windows Live Solution Center
http://windowslivehelp.com/
Maybe you are looking for
-
Remote works except the click to start anything.
Remote works except the click to start. By side-scan works well, nothing will launch.
-
I have a p6230f. I am trying to add a Seagate SSD 240 GB. On my motherboard, there is a SATA 1.0 that my current hard drive is connected to. A 2.0 SATA connected to my optical drive and a SATA 3.0 port empty. I tried to use the 3.0 for my new SSD
-
Cannot configure my Readynas 10200
I'm trying to set up my new Readynas 10200 with a MacBook Pro, but when I get to the screen where I am supposed to appoint my readynas and set the timezone, I get a "peripheral Communication error" tells me Readycould temporarily lost communication w
-
How to find the path to an executable of construction labview
After generating an executable file with Labview and the installer, users install on some PCs. During the installation process, they have the option to install to a directory of choice here. How can I know this way of installation with a non-labview,
-
someone found an effective way to remove the Vista Internet Security thugs 2012 utility
I need help to remove Vista Internet Security 2012 rogue utility. Any thoughts? Thx a lot