column using the line
I have this result of the query;Select col1 from
T1;
col1
-------
2
3
4, 6
5,1,7
I want the result to be like this
col1
----------
2
3
4
6
5
1
7
I'm new in 10g, please help
Thanks to Peter ;)
Re: Simple Question: how to divide the string into multiple lines concatenated?
SQL> with t1 as ( -- generating sample data
2 select '2' col1 from dual union all
3 select '3' from dual union all
4 select '4,6' from dual union all
5 select '5,1,7' from dual
6 )
7 --
8 -- actual query
9 --
10 select regexp_substr(col1,'[^,]+',1,s2.column_value)
11 from t1
12 , table ( cast ( multiset(select rownum rn from dual connect by rownum <= length(col1) - length(replace(col1, ',')) + 1)
13 as sys.dbms_debug_vc2coll
14 )) s2
15 /
REGEXP_SUBSTR(COL1,'
--------------------
2
3
4
6
5
1
7
7 rows selected.
Tags: Database
Similar Questions
-
The message says "to use the line tool java command, you must install a JDK. Click on "more information visit the java developer kit download site." I followed all these steps and downloaded the correct software update, but still getting the message.
A
If you have installed the plugin of Facebook video appeal and you no longer want to use it, you can remove it as follows.
1 back up all data.
2. open the library folder in your home folder by holding down the option key and selecting
Go ▹ library
in the Finder menu bar.
3. place these items in the library folder to the Trash:
LaunchAgents/com.facebook.videochat.name.plist
Support/Facebook app
Here the name represents the name of your Facebook.
4 log off or restart the computer, and then empty the trash.
B
If you do not use this plugin, or any other software (for example, some Adobe products), which depends on Java, install the Java runtime distributed by Apple.
C
If you do not have the Facebook plugin and you don't want to install Java, please ask for further instructions.
-
Cannot be joined lines when using the line Segment tool
So unfortunately, I've updated to the latest version of Illustrator Cc (V19.2.1). And to my horror, I can no longer draw a line (with the line segment tool) then draw another line, coming from the previous those anchor point. When I try to shoot immediately. He's trying to turn the line rather than create a line joining... anyway to change that or am I stuck with it?
(Also, I use windows currently..)
http://Tinypic.com/player.php?v=iqc0mc & s = 9 #. Vr5gifJ95hE
I don't know if you can say/see/see in the video, but here's the process that I'm following departure using the line-drawing the line-> > segment trying to draw a line from that anchor point (and that is the question, when I'm doing it automatically, it assumes I want to transform the line)-> changes to the tool selection and clicks on the line to deselect-> goes back and finishes object, repeating the process.
Help me please... I'm desperate...
It is these new life forms, a few disadvantages too with the rectangle tool, ellipse etc. tool.
to go back to the old behavior
Object > shape > expand the form, do a deed for him, or do what I did a hotkey (Windows 7).
Edit > keyboard shortcuts > Menu commands > object > shape > expand the form , then in the first box to the right click in it, select and press a key on the keyboard, I choose F9, OK and name.
It's an extra step, having to have a finger on the mouse and the other on the keyboard for each line. but I can't think otherwise.
-
Now shift isn't snapping line when you use the line Segment tool
I could be wrong and it has always been like that, but when I take a shift to rotate a line created by using the line Segment tool turns is more degrees as I thought that it used to. I checked and it works always with the Rectangle tool, but not when I traced a line. Guides and snap to Point are both on.
Is much more annoying when I'm dragging an end point and it will remain at an ideal level of 90 or 45 angle... but nevertheless it remains valid this angle when I paint, just do not change.
Matt,
You are not alone.
See this thread with a link to the other thread:
-
How to upgrade the value of line in a report by using the line selector (check box)
Hello
I have a requirement where I need to make PLSQL update process on a specific line in my report.
Based on the line selector (marked) the plsql process update on the values of the selected line.
I have to update status of the employee selected as 3.
But regardless of the choice of line selector, juice processing SRM application in a sequence that is., this is row selected, application takes the first line and updates the status.
My update process from looks like this:
BEGIN
BECAUSE me in 1... apex_application.g_f01. COUNTY - checkbox
LOOP
If apex_application.g_f01 (i) only IS NOT NULL then - box marked
insert into values TEMP_T (apex_application.g_f03 (i), V ('APP_USER')); -f03:Deptno
update status set Table_x = 3 where deptno in (select deptno from TEMP_T where rtrim (lower (apex_user)) = rtrim (lower (V ('APP_USER')));
delete from TEMP_T where rtrim (lower (apex_user)) = rtrim (lower (V ('APP_USER')));
end if;
END LOOP;
END;
Once the user selects the line selector, application needs to update the status of this particular emp 3 in Table_X.
Currently, if I select a line, using the line selection box, my update process changes the status of the first record line. If I select three rows, then my first three rows updated.
So I have to update the particular line or selected using the selector (checkbox) row lines
If you could help me solve this question would be really appreciated.
Thank you
VijayThis example shows how to use checkboxes in tabular form:
http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:95
Denes Kubicek
------------------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------------------ -
How to upgrade a table column using the values in the Oracle collection
On the "BOLD" line, I don't know how I should move the values of the collection of name I said without which are set all the values in the table supplier_16 = 'Saral.create or replace procedure test_coll IS CURSOR upd IS SELECT CONTACT_NAME FROM Supplier_16; TYPE dept IS TABLE OF upd%rowtype; cur_var dept; Type List Is table Of varchar2(20); Name List:= List('Shilpi','Sunil','Shreyas','Saral'); BEGIN OPEN upd; LOOP FETCH upd BULK COLLECT INTO cur_var; -- EXIT WHEN upd%NOTFOUND; FORALL i IN cur_var.FIRST..cur_var.LAST UPDATE supplier_16 ** SET Contact_name= name(i); *** COMMIT; END LOOP; CLOSE upd; END;
Help, please.Aashish S. wrote:
Thank you very much...Yes, I slide collections and was trying to reach somwthing on similar lines to which you provided the code example...
My essay is equipped to take a collection: initialized with values of say 3-4...
Take other tables... A column... and update the column in the table (not PK, FK anything) using the values of the initialized collection...
However, I am stuck between the two on how the UPDATE clause should be...
OK, if it's just because you want to practice with collections, you might do something like this...
SQL> set serverout on SQL> create table supplier_16 as 2 select 'Frederick' as contact_name from dual union all 3 select 'Robert' from dual union all 4 select 'Jeremy' from dual union all 5 select 'Simon' from dual 6 / Table created. SQL> create or replace procedure test_coll is 2 CURSOR upd IS 3 SELECT CONTACT_NAME 4 FROM Supplier_16 5 FOR UPDATE; 6 Type List Is table Of varchar2(20); 7 Name List := List('Shilpi','Sunil','Shreyas','Saral'); 8 v_contact_name varchar2(30); 9 v_idx number := 1; 10 BEGIN 11 OPEN upd; 12 LOOP 13 FETCH upd INTO v_contact_name; 14 EXIT WHEN upd%NOTFOUND; 15 UPDATE supplier_16 16 SET contact_name = name(v_idx) 17 WHERE CURRENT OF upd; 18 DBMS_OUTPUT.PUT_LINE(v_contact_name||' update to '||name(v_idx)); 19 v_idx := v_idx + 1; 20 END LOOP; 21 CLOSE upd; 22 COMMIT; 23 END; 24 / Procedure created. SQL> exec test_coll; Frederick update to Shilpi Robert update to Sunil Jeremy update to Shreyas Simon update to Saral PL/SQL procedure successfully completed. SQL> select * from supplier_16; CONTACT_N --------- Shilpi Sunil Shreyas Saral
Of course, there is treatment rank by rank and is not best for performance, but it allows you to access your collection that you created names.
-
Conversion of column to the lines
Hello
I'm currently building and SQL to convert columns from several lines to all lines - see below the test data and the expected result:
CREATE TABLE XX_TEST (NAME VARCHAR2 (10), A1 VARCHAR2 (10), A2 VARCHAR2 (10), A3 VARCHAR2 (10), A4 VARCHAR2 (10), A5 VARCHAR2 (10));
INSERT INTO XX_TEST VALUES('LIST','A','B','C','D','E');
INSERT INTO XX_TEST VALUES('L1','1',,'3',,);
INSERT INTO XX_TEST VALUES('L2','1','5','4',,);
ENGAGE
SELECT * FROM XX_TEST;
Expected result:
NAME is the table XX_TEST column, but the COLUMN and the VALUE are converted to lines - columns
NAME THE COLUMN VALUE
L1 A1 1
L1 A2 NULL
L1 A3 3
L1 A4 NULL
L1 A5 NULL
L2 A1 1
L2 A2 5
L2 A3 4
L2 NULL A4
L2 A5 NULL
Thank you
BSHello
user13409900 wrote:
Thank you Alex and Frank,Don't foget Aketi!
The two ways are really good and functional in my situation.
I apologize for not giving version: I'm on 11g so I think that can use Unpivot. It would be really more faster (performance given the volume of data) to use unpivot characteristic of 11 g?If there is no significant difference, whereas I think is that SELECT... UNPIVOT would be faster. It is purely a guess. It depends on several factors, including your data, your index and your machine. I don't have access to one of them.
Try both ways and compare performance. (Compare the results, too, to check that the two qiueries are really doing the same thing).
If you need help, see this thread:
HOW to: Validate a query of SQL statement tuning - model showingI've never used before unpivot.
This sounds like a good opportunity to learn.
-
question how to get/use the line separator
I'm trying to get the line of the system separator and use it in a text that is getting added to a TextField.
System.getProperty ("line.separator") returns null.
What is the correct way to do it?
Here is a code example:
String newLine = System.getProperty("line.separator"); String text = "First line of text." + newLine + "Secon line of text." + newLine + "Last line of some more text."; TextField t = new TextField(TextField.READONLY); t.setText(text);
I tried this with the Simulator and on a Pearl 8100.
I use JDE plugin for Eclipse 1.0.0.50
BlackBerry component Pack 4.5.0.14.
2.9.0.52 - Blackberry 8100 smartphone Simulator
The device software is 4.5.0.110
Thank you
If I understand the question, what right do something like "\n"?
-
derivation of column using the logic of date
Hello
I have the tables below where I need the output as below
main_table
MI_ACC_IDENTIFIER ENT_PST_DTE 11 12 SEP-14 00.00.00 11 12 OCTOBER 14 00.00.00 Table_reference
MI_ACC_IDENTIFIER CHARGE_START_DATE CHARGE_END_DATE 11 1ST AUGUST 14 00.00.00 31 AUGUST 14 00.00.00 11 01 OCT-14 00.00.00 30 SEP-14 00.00.00 11 1ST OCTOBER 14 00.00.00 31 OCTOBER 14 00.00.00 bucket
INPUT_REF PROD_BUCKET_ID MI_ACC_IDENTIFIER ACT_START_DATE ACT_END_DATE 999 1478 11 9 JULY 07 00.00.00 JUNE 4 08 00.00.00 999 1477 11 01 OCT-14 00.00.00 31 OCTOBER 14 00.00.00 output
MI_ACC_IDENTIFIER ENT_PST_DTE CHARGE_START_DATE CHARGE_END_DATE 11 12 SEP-14 00.00.00 1ST AUGUST 14 00.00.00 31 AUGUST 14 00.00.00 11 12 OCTOBER 14 00.00.00 01 OCT-14 00.00.00 30 SEP-14 00.00.00 Requirement
01. I need to check the ent_pst_dte of main_table between dates of table_reference and take into account the previous dates
02 ent_pst_dte of the table main must firstly between dates of bucket table into that he will fall in 1477 (prod_bucket_id), then only it should check if between dates of table_reference
There may be multiple records in the bucket with id unique input_ref whenever the dates change the prod_bucket_id changes so I refer are based on columns input_ref and mi_acc_indentifier
Queries:
CREATE TABLE 'MAIN_TABLE '.
("MI_ACC_IDENTIFIER" NUMBER (10,0) NOT NULL ACTIVATE,)
DATE OF THE 'ENT_PST_DTE '.
);
Insert into main_table (MI_ACC_IDENTIFIER, ENT_PST_DTE) values (11, to_date (12-SEP14 00.00.00','DD-MON-RR HH24.MI.)) SS'));
Insert into main_table (MI_ACC_IDENTIFIER, ENT_PST_DTE) values (11, to_date (October 12, 14 00.00.00','DD-MON-RR HH24.MI.)) SS'));
CREATE TABLE 'TABLE_REFERENCE.
("MI_ACC_IDENTIFIER" NUMBER (10,0) NOT NULL ACTIVATE,)
DATE OF THE "CHARGE_START_DATE."
DATE OF THE 'CHARGE_END_DATE '.
);
Insert into table_reference (MI_ACC_IDENTIFIER, CHARGE_START_DATE, CHARGE_END_DATE) values (11, to_date (1 August 14 00.00.00','DD-MON-RR HH24.MI.)) SS'), to_date (August 31, 14 00.00.00','DD-MON-RR HH24.MI.) SS'));
Insert into table_reference (MI_ACC_IDENTIFIER, CHARGE_START_DATE, CHARGE_END_DATE) values (11, to_date ('01 - SEP - 14 00.00.00','DD-MON-RR HH24.MI.)) SS'), to_date (30-OCT-14 00.00.00','DD-MON-RR HH24.MI.) SS'));
Insert into table_reference (MI_ACC_IDENTIFIER, CHARGE_START_DATE, CHARGE_END_DATE) values (11, to_date (1 October 14 00.00.00','DD-MON-RR HH24.MI.)) SS'), to_date (31 October 14 00.00.00','DD-MON-RR HH24.MI.) SS'));
CREATE TABLE 'BUCKET '.
(VARCHAR2 (10 BYTE) "INPUT_REF",
VARCHAR2 (10 BYTE) "PROD_BUCKET_ID."
NUMBER (10,0) "MI_ACC_IDENTIFIER."
DATE OF THE "ACT_START_DATE."
DATE OF THE 'ACT_END_DATE '.
);
Insert in bucket (INPUT_REF, PROD_BUCKET_ID, MI_ACC_IDENTIFIER, ACT_START_DATE, ACT_END_DATE) values ('999 ', ' 1478', 11, to_date (9 July 07 00.00.00','DD-MON-RR HH24.MI.)) To_date SS'), (4 June 08 00.00.00','DD-MON-RR HH24.MI.) SS'));
Insert in bucket (INPUT_REF, PROD_BUCKET_ID, MI_ACC_IDENTIFIER, ACT_START_DATE, ACT_END_DATE) values ('999 ', ' 1477', 11, to_date ('01 - SEP - 14 00.00.00','DD-MON-RR HH24.MI.)) SS'), to_date (31 October 14 00.00.00','DD-MON-RR HH24.MI.) SS'));
Your condition isn't all Claire - you want to find the lines of main_table where the date in a date range of bucket; then find the corresponding line of table_reference, but note the dates of beginning and end of the period last ? Something like that, maybe?
WITH ref_plus AS)
SELECT r.ml_acc_identifier,
r.charge_start_date,
r.charge_end_date,
LAG (r.charge_start_date) OVER (partition by order of r.charge_start_date r.ml_acc_identifier) prev_start_date,.
LAG (r.charge_end_date) OVER (partition by order of r.charge_end_date r.ml_acc_identifier) prev_end_date
From table_reference r)
SELECT m.ml_acc_identifier,
m.ent_pst_dte,
r.prev_start_date charge_start_date,
r.prev_end_date charge_end_date
OF main_table m
INNER JOIN bucket b
ON b.ml_acc_identifier = m.ml_acc_identifier
AND m.ent_pst_dte BETWEEN b.act_start_date AND b.act_end_date
INNER JOIN ref_plus r
ON r.ml_acc_identifier = m.ml_acc_identifier
AND m.ent_pst_dte BETWEEN r.charge_start_date AND r.charge_end_date
-
Use the lines of a text file as input to an SQL command
Hello
I have a text file containing the lines...
123
1234
I would like to use as input for a SQL command running in a script. ie
Update flag set < table > = 'Y' where job = < the text file lines >;
Any help much appreciated.
See you soon
External table will do.
For reference...
CREATE TABLE Hold'em (SEQ_NUM NUMBER (10));
insertion in hold select SEQ_NUM in task where proc like '% PROC;
update set hold_flag = task ' ' where in SEQ_NUM (select hold SEQ_NUM);
-
TreeModel - move through the records of children using the line EL
Hi all
Jdev Version: Studio Edition Version 11.1.1.7.0
I have a search page where I need to display the search results on one of the columns and header to display a concatenated list of children.
Header is a task and children are rights holders of the task. I'm looking to achieve using a normal table linked to an affair of the tree within which the display link "Assignee" is added as a child. If the link is ready. I try to use the af: table using the treeModel which seems to work very well.
Now I'm stuck on how to browse the controllers for each task with the help of EL - #{row.?}
JSFF Code snippet
<af:table value="#{bindings.Task1.treeModel}" var="row" rows="#{bindings.Task1.rangeSize}" summary="#{ResourcesGenBundle['Header.SearchResults']}" varStatus="tableMetadata" selectionListener="#{backingBeanScope.TaskSearchBean.selectHandler}" width="100%" columnStretching="column:resId1c5" autoHeightRows="15"> <af:column id="c3" headerText="Assignees"> <af:iterator id="i1" rows="2" var="assigRow" value="#{row.Task11.collectionModel}"> <af:outputText value="#{assigRow.UserName}" id="ot2"/> <af:spacer width="10" height="10" id="s2"/> </af:iterator> </af:column> </af:table>
Excerpt from page Def
<tree IterBinding="Task1Iterator" id="Task1"> <nodeDefinition DefName="sample.common.publicModel.components.view.TaskVO" Name="Task10"> <AttrNames> <Item Value="TaskId"/> <Item Value="Subject"/> <Item Value="Description"/> <Item Value="PastDue"/> </AttrNames> <Accessors> <Item Value="TaskUser"/> </Accessors> </nodeDefinition> <nodeDefinition DefName="sample.common.publicModel.components.view.TaskUserVO" Name="Task11"> <AttrNames> <Item Value="ListName"/> <Item Value="PersonId"/> <Item Value="UserRole"/> </AttrNames> </nodeDefinition> </tree>
Thank you
Srini
Finally solved it. The iterator works with #{rank. TaskUser}. Yippe!
-
change the column using the trigger
Hello
is there any possibility or a way around to change a LONG column in a trigger BEFORE INSERT and BEFORE UPDATE?
the scenario is like this.
Old DOS applications (this is why we must use LONG in the Oracle), they inserting a record in Oracle (9.2.0.8 - HP UX).
They are inserting ASCII characters that must be converted properly by Oracle using REPLACE.
But the problem is that I can not handle a long TIME in relaxation.
We have set the Oracle Client and Server NLS_LANG by using the same character set ISO-8859-1.
but in some sort the ASCII character has managed to go to the Oracle, and it had not stored in the database.
Use change will take more time than making a cleaning trash in the database.
Is there a way around that you think.OK, you have your problem:
Check this box:
SQL> create table t ( user_id number, user_account varchar2 (10), user_status varchar2 (1), user_message long ) / Table created. SQL> create or replace trigger t_trg after insert on t for each row declare l_new_long long; begin execute immediate ' declare l long; begin select user_message into l from t@loopback where user_id = :1; update t@loopback set user_message = replace(l, ''Some'', ''Some other'') where user_id = :1; end; ' using :new.user_id; end t_trg; / Trigger created. SQL> insert into t values (1, 'michael', 'Y', 'Some Message') / 1 row created. SQL> select * from t / USER_ID USER_ACCOUNT USER_STATUS USER_MESSAGE ---------- ------------ ----------- -------------------- 1 michael Y Some other Message 1 row selected.
-
I use indesign for books of the brand. I need always insert quotes from some holy books. so I need to insert text using the verse number
If you are looking for a way to automate where to insert the text? I really don't understand what you're trying to do.
-
How to get a column using the logical AND operator on two columns?
All columns are the VARCHAR2 data type.
I got out of the table in this way:
col1 col2
but I want an extra column in this way:
True True
True false
False falsecol1 col2 result
as the clear sound output shows this column resut is logical operator AND
True True True
True false false
Fake fake fake
col1 and col2. How to get there?WITH t AS (SELECT 'True' col1, 'True' col2 FROM DUAL UNION ALL SELECT 'True' col1, 'False' col2 FROM DUAL UNION ALL SELECT 'False' col1, 'True' col2 FROM DUAL UNION ALL SELECT 'False' col1, 'False' col2FROM DUAL) SELECT col1,col2,CASE WHEN col1 = 'True' AND col2 = 'True' THEN 'True' WHEN col1 = 'True' AND col2 = 'False' THEN 'False' WHEN col1 = 'False' AND col2 = 'True' THEN 'False' WHEN col1 = 'False' AND col2 = 'False' THEN 'False' END AS RESULT FROM t
-
text HTML anchor tag uses the line
Here is one. When I shoot html as text in a text field, and set the paragraph to align to the right, the entire line is defined as a link.
Is there anyway to make sure the link is not made for the entire line?
Example:
< p align = "right" > < a href = "link" > Link Text < /a > < /p >
Any help would be appreciated.
WallyTIm,
Thanks for that. I came up with the same results. Because I'm all loading of external files, I wanted to shy from the exhausts of all these characters. But you certainly helped me to find a solution.
I took some of my text links and dropped everything in a test film I've worked with and has accidentally left the
tag in the head, which appears in the html code. Needless to say that the text "untitled document" doesn't have the hyperlink applied. So I got to thinking, "what happens if I put text before and after the anchor tag." And sure enough. NO HYPER LINK on the new text. Then I got to thinking, 'Hmm. Maybe I'll just put a character before and after the hyperlink and set its color to white so it will not be displayed. »
Of course, it worked. So this is my fix/workaround. If you have a hyperlink which is aligned to the right and it appears on the line, put a character before and after the hyperlink and do he same as the background color.
It worked, but HELLO ADOBE / FLASH TEAM! Please fix the bug and implement HTML 4.0 or higher if we don't get to these workaround solutions crazy, Please.
Thanks to all who helped on this. Great community!
Wally
Maybe you are looking for
-
Save the MacBook Pro - white screen of death
My macbook pro starts, I get the ringtone to start and then the white screen of death that led to the computer to activate the walk and walk. I bring in my computer for repairs, but I am not able to save anything as none of the start up works. I can
-
How to install "FM100 YUAN" on the Qosmio G50
I recently bought a new Toshiba Qosmio G50 laptop. When you first start up Windows keeps giving me a message saying "Windows needs to install driver software for your YUAN FM100".Google suggests YUAN is the company that makes the TV Tuner software -
-
System tray clock does not hold time
I have a laptop DV6 3000 running on Win7-64 Home Entertainment. The clock in the system tray is not keeping time. Research Interent showed me the battery on the motherboard, I traded that last night with a new one and it is still wasting time. It see
-
Tape library PowerVault TL2000 &; drive LT05 HH
Hi all I checked the firmware on my PowerVault TL2000 tape, 9t 30 which is updated. I'm looking to update the firmware of the player LT05 HH, which is obsolete and has the d2as version. I can't find the firmware for LT05 HH, I found LT05 but without
-
What is the best video player for windows 8 that can run video of all formats
in fact I was using "vlc media player" but I found it damage my jump top audio system so now I'm confused, guide me please... Thank you.. :))