Single field into multiple lines of cutting
Hi all
with res in the
(select 10 as id, 'history of medic' as the title of double union )
Select 20 as id, 'hospital of oklahoma heart' as the title of double union
Select 30 as id, ' Date/time end " like double title " )
Select disitnct
a.ID, a.title
res a
Output of the above code:
ID TITLE
10 background medic
Heart 20 oklahoma hospital
30 latest End Date/time
Here's my task, I need an output like below.
ID TITLE
10 past
10 medic
10 history
20 oklahoma
heart 20
Hospital 20
30 last
30 end
30 date/time
Thanks in advance.
A simple search can do wonders for you
Tags: Database
Similar Questions
-
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!
-
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
-
Split a string of html into multiple lines
I'm trying to convert a string into several lines using REGEX, can someone tell me if this is achievable using expressions regular oracle
WITH qry AS)
SELECT ' < p > < /p > < p > two < /p > < p > 3 < /p > ' Str
OF THE DOUBLE
)
SELECT
-regexp_replace)
-regexp_replace)
regexp_substr (str,
' [^ < (/?) p >]. (*', 1, LEVEL)
(-, '< p >', ")
(-, "< /p >", ")
AB
OF qry
CONNECTION OF LEVEL < = LENGTH (regexp_replace (str, ' [^ < (/?) p >]. * "")) + 1
;
Output current:
1 a < /p > < p > two < /p > < p > 3 < /p >
2 (null)
3 (null)
4 (null)
Expected results:
1 a
2 two
3 three
user2022369 wrote:
You are right that I excluded NULL, 8 rows out put to our example looks correct to me
The result included "two" because its locked up in one of our separators
'
I'm not sure of any character that never appear in str
Thank you
Something like:
WITH qry AS)
SELECT "Hello World
one
a header
a text orhere goestwo
more text herethree ' str
OF the double
)
SELECT THE LEVEL,
REGEXP_SUBSTR)
Str,
'(())? (.*?) (()|$)',
1,
LEVEL,
'I,
4
) ab
OF qry
CONNECT BY LEVEL<>
Str,
'(())? (.*?) (()|$)',
1,
'I '.
)
/
LEVEL AB
---------- --------------------------------------------------
1 Hello World
2 a
3 a header
a text orhere goes
4 two
5 more text here
6 three6 selected lines.
SQL >
SY.
-
LiveCycle ES2 - text field empty multiple lines deleting data entry for clients
Hello
I use a Java Script to add several lines to an empty text field. If the customer type in the text field replaces the lines. If the client prints only the form, they remain the lines. The problem I have is if the customer type in the domain and must then go back and change the text, as long as they tab or click on the text field in the because the text disappears.
I didn't write that code, and I don't know how to get back in touch with the person who did it.
DRF1. SubForm.field_name::Initialize - (JavaScript, client)
this.rawValue = "\n________________________________\n\n________________________________\n\n______________ __________________\n\n________________________________\n";
DRF1. SubForm.field_name::Enter - (JavaScript, client)
this.rawValue = null;
DRF1. SubForm.field_name::Exit - (JavaScript, client)
If (this.) RawValue is nothing)
{
this.rawValue = "\n________________________________\n\n________________________________\n\n______________ __________________\n\n________________________________\n";
} else {}
I guess I need to change the value "enter", but I'm not sure how to edit. Your help is greatly appreciated! I'm not a programmer.
Hello
I think you might be better with another approach, with this approach, the user will have the same trouble if they save the form and open later.
Try to change the initialization script
this.format.picture.value = "null{________________________________\r\n________________________________\r\n________________________________\r\n________________________________}";
You will then be able to completely remove the code entry and exit events.
The above code sets the display null model, which means that it will appear only if the field has no value. Normally, you can enter this in the model display dialog box but that you cannot enter return carridge/newline characters.
Concerning
Bruce
-
Adding field values into multiple lines in a dynamic table
Hello!
I have create this form (timesheet) where I have a dynamic array with a variable number of lines (I'm adding instances with a single click of a button).
All rows with a field of totalLinhaRelatorio , it is a time field and I need all of these fields to be added to get a total final.
So, I tried these two lines of script (FormCalc):
var finalTotal = sum (Time2Num (rio parteInferior.atividades.tabelaAtividades.linhaAtividade [*] [*] .totalLinhaRelato, "HH: mm"))
$.formattedValue = Num2Time (finalTotal, "HH: mm")
It doesn´t works as I expected. The field gets properly just the value of the first row.
I tried other combinations, such as linhaAtividade.totalLinhaRelatorio [*] and .totalLinhaRelatorio linhaAtividade [*], but nothing seems to work.
Help, please!
Marcos
You're welcome Marcos!
Yes, it is possible, but I've never used FormCalc to do, preferring to JavaScript. As you use the time functions, it makes sense to stick with FormCalc.
Take a look at the syntax here:
http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000211.html.
Hope that helps,
Niall
-
Cutting into multiple lines line values
I have the table with columns like below
Table name: Test
Column name: Col1, col2, col3, col4
Values of column as below
col1 col2 col3 col4
A cod mod ss; AA; DD ff; Gg; AAS; feq
B asd; DFG; as fgh null
Ouput: I'm looking:
col1 col2 col3 col4
A cod ss dd
A mod gg aa
A ff aas
A feq
B asd fgh
B dfg
B as
Can someone help me on this?
But if you insist
with
a trial in
(select 'A' col1, col2 "cod;) MOD','ss; AA; FF' col3, col4 'dd, gg, ASA, feq' Union double all the
Select ' B', ' ASD. DFG; ACEs ', 'Natacha', the double null
)
Select col1,
NULLIF (regexp_substr (NVL(col2,'~'), "[^;]")) +', 1, level),'~ ') col2.
NULLIF (regexp_substr (NVL(col3,'~'), "[^;]")) +', 1, level),'~ ') col3.
NULLIF (regexp_substr (NVL(COL4,'~'), "[^;]")) +', 1, level),'~ ') col4
of the test
connect by level<= greatest(regexp_count(nvl(col2,'~'),';'),regexp_count(nvl(col3,'~'),';'),regexp_count(nvl(col4,'~'),';'))="" +="">=>
and prior col1 = col1
and prior sys_guid() is not null
COL1 COL2 COL3 COL4 A COD SS DD A MOD AA GG A - FF AAS A - - FEQ B ASD FGH - B DFG - - B as - - Concerning
Etbin
-
Divide the values of a single column into multiple values of columns
I want that the values of the "col_val" column to divide into several values in the column
Table1:
Col_val Col1, Col2
Code1 POINT 45
L2 AB 45
L1 POINT 45 OF
Code2 CAB 61
ABC 51 LABORATORY
SSS LAB 45
QQQ BED 123
BBV COT 100
FFF COT 444
Output as expected:
OUT1 out2 out3-out4, out5
Code1 AB SSS
L1
Code2
ABC
QQQ
BBV
FFF
Each line must contain the values corresponding to the Col2 values and each column must have the values in Col1, as illustrated above.
SQL> with t 2 as 3 ( 4 select 'Code1' col_val, 'ITEM' col1, 45 col2 5 from dual 6 union all 7 select 'L2' col_val, 'AB' col1, 45 col2 8 from dual 9 union all 10 select 'L1' col_val, 'ITEM' col1, 45 col2 11 from dual 12 union all 13 select 'Code2' col_val, 'CAB' col1, 61 col2 14 from dual 15 union all 16 select 'ABC' col_val, 'LAB' col1, 51 col2 17 from dual 18 union all 19 select 'SSS' col_val, 'LAB' col1, 45 col2 20 from dual 21 union all 22 select 'QQQ' col_val, 'COT' col1, 123 col2 23 from dual 24 union all 25 select 'BBV' col_val, 'COT' col1, 100 col2 26 from dual 27 union all 28 select 'FFF' col_val, 'COT' col1, 444 col2 29 from dual 30 ) 31 select max(col1) 32 , max(col2) 33 , max(col3) 34 , max(col4) 35 , max(col5) 36 from ( 37 select decode(col1, 'ITEM', col_val) col1 38 , decode(col1, 'AB' , col_val) col2 39 , decode(col1, 'LAB' , col_val) col3 40 , decode(col1, 'CAB' , col_val) col4 41 , decode(col1, 'COT' , col_val) col5 42 , t.col2 col_2 43 , row_number() over(partition by col2, col1 order by 1) rno 44 from t 45 ) 46 group 47 by col_2, rno 48 order 49 by col_2; MAX(C MAX(C MAX(C MAX(C MAX(C ----- ----- ----- ----- ----- Code1 L2 SSS L1 ABC Code2 BBV QQQ FFF 7 rows selected. SQL>
-
Several checkboxes in a form into multiple lines
Here's the problem I have. I have a table with a list of products and orders. I need to match products to orders in an orginizational page.
I created a repeat region and a set of product images which uses images of products and id to create a list. This part works just fine and it is part of the submission form. The code looks like this:
<? PHP {? >}
< li > <? PHP echo "" < img src = "... / images /', $row_imageListRS ["imageName"] ', '" width = "172" height = "120" > < br / > "
', $row_imageListRS ["altDescription"];? >
< input type = "checkbox" name = 'imgID' value = "<?" PHP echo $row_imageListRS ['id']? ">" / > < br / >
<? PHP echo $row_imageListRS ['id'];? > < /li >
< input type = "hidden" name = "userID" value = "<?" PHP echo $row_currentUserRS ['userID'];? ">" / >
< input type = "hidden" name = "glryID" value = "<?" PHP echo $row_pageRS ['id'];? ">" / >
< input type = "hidden" name = "MM_insert" value = "form1" / >
<? PHP} while ($row_imageListRS = mysql_fetch_assoc ($imageListRS));? >
(that didn't fit in the box formatting)
It gives me a well-formatted list of all products with a checkbox for each image.
Other information is a user ID and an ID of order that also work very well.
I created a function to insert which should work to populate a database table that has only 3 columns other than the primary ID. The columns are, userID, glryID and imgID. I want to be able to review the order and check a bunch of images of the generated list and then click on the submit button and have a new line generated for each image ID.
The problem I have is that the insert loop isn't looped and I get only the first digit of the information. Here's the code for that:
for ($i = 0, $len = count($_POST['imgID']); $i < $len; $i++) { $insertSQL = sprintf("INSERT INTO glryImages (userID, imgID, glryID) VALUES (%s, %s, %s)", GetSQLValueString($_POST['userID'][$i], "int"), GetSQLValueString($_POST['imgID'][$i], "int"), GetSQLValueString($_POST['glryID'][$i], "int")); mysql_select_db($database_mbtseaDB, $mbtseaDB); $Result1 = mysql_query($insertSQL, $mbtseaDB) or die(mysql_error());
I can't understand why I get only one entry per shipment, and I can't understand why I get only the first digit.
For example, if the user ID is 93 and the ID of the image is 42 and the page id is 12 on line of the resulting table is userID 9 imgID 4 and glryID 1.
I'm sure that the error is in the first line of code for the Insert method. Any help would be appreciated.
I thought I would post the solution because it was a simple thing to overlook. After you set the loop of the boxes I called the original again variable in the insert method. Whatever it took, it was change the line in the middle of the insertion section-
GetSQLValueString ($_POST ['imgID'], "int").
at GerSQLValueString ($imgID, "int").
The crazy is that I made the same mistake before a dozen times. Set a value, and then call the definition instead of the value of the whole...
Thanks to all who watched and didn't see the same thing I don't see. H hope this helps someone else.
-
I need all the information to display so I need the scroll key to work, but it is not editable.
Thanks for the help!
Tania
You can define a field with strike and validate to prevent the user from changing the value of the field. First, set the field to multiline and 'Scroll long text' and the default value for the text to display in the field. Then add a custom script to strike which is:
Custom keystroke script
Event.RC = false;
and to be complete, the validation script customized according to:
Custom validation script
If (event.value! == event.target.defaultValue) event.rc = false;
These scripts will prevent the value to be changed, at least in Acrobat and Reader if JavaScript is enabled.
-
How to divide framemaker single file into multiple pages through Robohelp html
Hello, I m Robohelp beginner and I would like to ask how can I split a Framemaker file into several html files. The process must follow the subchapters defined in Framemaker and they must be named with the subchaptername function.
Check out the Forum on the integration of FM - see "paging".
-
Arrange the tiles in a column, but multiple lines
When you have the tiles on The start screen of Metro , you can set the group / block a tile only, but when you want to add the second tile to this group / block, you can put only horizontally (from left or right tile existed), in other words, you can add the column within that group, but you can put the new Tile vertically , under a tile already existence.
I want to define group / block of tiles with a single column, but multiple lines.For example, instead of this:xx xx xx xxxx xx xxto get this:xx x xx xxxx x xx xxScreenshot:Hi Mike b. II.
It's normal. You cannot have tiles in groups vertically. Now in your case, if you change the tiles to large tiles, they will stack vertically.
-
Data in multiple lines concatenated into a single line to separate id
Hello
I have a t1 like this table:
create table t1
(number of c1,
number of C2,
C3 number (4.2)
);
Data in the table are such as:
----------------------------------------
C1 | C2 | C3 |
-----------------------------------------
102. 1. 1.1 |
102. 1. 1.2 |
102. 2. 2.1 |
103. 2. 2.1 |
103. 2. 2.2 |
-----------------------------------------
How to display data by using a query above?
------------------------------------------------------
C1 | C2 | C3 |
-------------------------------------------------------
102. 1, 2 | 1.1, 1.2, 2.1 |
103. 2. 2.1, 2.2.
------------------------------------------------------
Thank youSo you're after what we call 'Aggregation in the chain.'
Check this link as it highlights several techniques:
Aggregation of string techniques
A Re: Concat ranks of the values in a single column Michael
At Re: multiple lines in a single line in the 'single column Table' followed by reason of Billy on the conduct of a stragg first.
In addition, 11 GR 2 has the LISTAGG function.
-
Combine multiple lines into one line (from two tables / result sets)
Hello experts,
I would like to know how to combine multiple lines/records in a single record. Here are the DDL and DML to tables:
create table test_table)
client_name varchar2 (50 char),
login_time timestamp (6).
logout_time timestamp (6).
auto_type varchar2 (10 char)
)
create table root_table)
navigation_time timestamp (6).
client_name varchar2 (50 char),
VARCHAR2 (50 char) nom_du_groupe
)
Insert into test_table
values ("John", TO_TIMESTAMP ('2013-12-05 17:04:01.512 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), TO_TIMESTAMP ('2013-12-05 17:27:31.308 ',' YYYY-MM-DD HH24:MI:SS.) FF'), 'SIMPLE');
Insert into test_table
values ('David', TO_TIMESTAMP ('2013-12-05 06:33:01.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), TO_TIMESTAMP ('2013-12-05 06:45:01.112 ',' YYYY-MM-DD HH24:MI:SS.) FF'), 'SIMPLE');
insert into root_table
values (TO_TIMESTAMP ('2013-12-05 17:04:01.512 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "invalid");
insert into root_table
values (TO_TIMESTAMP ('2013-12-05 17:14:22.333 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "GROUP_1");
insert into root_table
values (TO_TIMESTAMP ('2013-12-05 17:27:31.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'John', "GROUP_1");
insert into root_table
values (TO_TIMESTAMP ('2013-12-05 06:33:01.308 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), "David", "invalid");
insert into root_table
values (TO_TIMESTAMP ('2013-12-05 06:45:01.112 ',' YYYY-MM-DD HH24:MI:SS.)) FF'), 'David', 'GROUP_5');
game results test_table
client_name login_time logout_time auto_type John 05/12/2013 5:04:01.512000 PM 05/12/2013 5:27:31.308000 PM SIMPLE David 05/12/2013 6:33:01.308000 AM 05/12/2013 6:45:01.112000 AM SIMPLE root_table result set
navigation_time client_name GroupName 05/12/2013 5:04:01.512000 PM John Not valid 05/12/2013 5:14:22.333000 PM John GROUP_1 05/12/2013 5:27:31.308000 PM John GROUP_1 05/12/2013 6:33:01.308000 AM David Not valid 05/12/2013 6:45:01.112000 AM David GROUP_5 And here is the SQL code I'm writing:
Select a.customer_name, a.login_time, a.logout_time, a.auto_type, Max (b.group_name)
from test_table a, b root_table
where a.customer_name = b.customer_name
Group of a.customer_name, a.login_time, a.logout_time, a.auto_type
As the 'invalid' value is greater than the value "GROUP_1" (based on the number of letter in English), the GroupName is returned as 'invalid '. I want to bring the GroupName based on the navigation_time column in the root_table so that it always returns a valid GroupName. Please help me.
Output current:
Client_name. Login_Time. Logout_Time | Auto_Type | GroupName
--------------------------------------------------------------------------------------------------------------------------------------------
John | 05/12/2013 5:04:01.512000 PM | 05/12/2013 5:27:31.308000 PM | SIMPLE | Not valid
David | 05/12/2013 6:33:01.308000 AM | 05/12/2013 6:45:01.112000 AM | SIMPLE | Not valid
Expected results:
Client_name. Login_Time. Logout_Time | Auto_Type | GroupName
--------------------------------------------------------------------------------------------------------------------------------------------
John | 05/12/2013 5:04:01.512000 PM | 05/12/2013 5:27:31.308000 PM | SIMPLE | GROUP_1
David | 05/12/2013 6:33:01.308000 AM | 05/12/2013 6:45:01.112000 AM | SIMPLE | GROUP_5
Thank you!
Adding INSERT statements, current and planned outputs.
This...
SELECT client_name
login_time,
logout_time,
auto_type,
GroupName
Of
(select a.customer_name,
a.login_time,
a.logout_time,
a.auto_type,
b.group_name,
ROW_NUMBER() over (PARTITION BY a.customer_name, a.login_time, a.logout_time, a.auto_type ORDER BY b.group_name) rn
from test_table a, b root_table
where a.customer_name = b.customer_name)
WHERE rn = 1;
OUTPUT:-
=========
David DECEMBER 5, 13 06.33.01.308000000 AM DECEMBER 5, 13 06.45.01.112000000 AM SIMPLE GROUP_5 John DECEMBER 5, 13 05.04.01.512000000 PM DECEMBER 5, 13 05.27.31.308000000 PM SIMPLE GROUP_1 Thank you
Ann
-
How to insert multiple lines using a single query
Hi all
How to insert multiple lines using a single query to the emp table?
I have the number of rows to insert into table x. consumes a lot of time. I tried to insert several lines using a single query, but get errors. I know exactly the query to do this.
Thank you
SunilLike this?
SQL> create table test(id number , dt date); Table created. SQL> insert into test values(&a,&b); Enter value for a: 1 --- It asked me and I entered 1 Enter value for b: sysdate --- It asked me and I entered sysdate old 1: insert into test values(&a,&b) new 1: insert into test values(1,sysdate) 1 row created. SQL>
g.
Maybe you are looking for
-
all the CDs that I burn come empty return
last month I was able to burn a cd, but now every time I burn a cd my cpu goes through the whole process of combustion, but when I play the they all empty!
-
Reinstall Windows XP after replacing hard drive
I had to replace the hard drive on my Lenovo 3000 n200 laptop. The old drive was unusable and recover nothing from him. I have backups of all the files and folders to an external drive, but this does not have to reinstall XP Pro on the new hard drive
-
Demo of VCS - C VCS-E without license
Hi all UC TP Experts, I just deployed the ovules of VCS 8.1 (s42700x8_1_0.ova) for the C Highway and Expressway-E on the Jabber without VPN demo. She is successful for me to configure the Expressway-C and it is failing for me create the 'traversal se
-
3315 to SNS 3415 device migration
I have a client with ISE 3315 with software version 1.3 four plays running, two nodes(Active-Active) for policy and two nodes(Active-Standby) for the admin. He bought a new four (4) devices with software version 2.0 3415 fast to replace the existing
-
I have photoshop related to my laptop, but I want to be able to use it on my PC, do I have to buy a second download of photoshop too, or is it possible to switch my PC instead?