CSV to lines question please
Hello
I have a csv list, but I want the csv in rows, something like that - any help is greatly appreciated.
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
WITH t
AS (SELECT "a" id, 1, 2, 3, 4' ordr FROM DUAL)
UNION
ID to SELECT 'b', ' 1, 2, 3, 4, 5' ordr FROM DUAL
UNION
SELECT 'c' id, 7, 8' ordr FROM DUAL)
SELECT *.
T
want to the result like this-
ID - ordr
a 1
a 2
a 3
a 4
b 1
b 2
b 3
b 4
b 5
c 7
c 8
Thank you very much.
Here's how:
Notes on the Oracle: split delimited by a comma the way of RegExp string, second part
SQL > WITH t AS (SELECT 'a' id, ordr ' 1, 2, 3, 4' UNION DOUBLE)
2 id SELECT 'b', ordr ' 1, 2, 3, 4, 5' OF the UNION DOUBLE
3. SELECT 'c' id, 7, 8' ordr FROM DUAL)
4. select id
5, regexp_substr (ordr, ' [^,] +', 1, rn) split
6 t
7 cross join (select rownum rn
8 in (select max (length (regexp_replace (ordr, ' [^,] +'))) + 1 mx)
9 from t
10 )
11. connect by level<=>=>
12 )
where the 13 regexp_substr (ordr, ' [^,] +', 1, rn) is not null
14 order of 1,2;
I SHARED
- ---------
a 1
a 2
a 3
a 4
b 1
b 2
b 3
b 4
b 5
c 7
c 8
11 selected lines.
Tags: Database
Similar Questions
-
My ID apple has been disabled and I can't restore it because I forgot my security question, please help
I can't update my iphone because it will need for my apple for activation ID. Please help me.
Contact Apple for assistance with the security of the Apple ID - Apple Support accounts
-
I have a question please. Are the activation of wifi, Bluetooth and 3G while I'm outdoor consume the battery of my iPhone (6 s) and reduce its life expectancy?
If you want your Apple Watch to stay connected to the phone, you need to keep compatible BlueTooth.
All functions of the phone will use up the battery life. Some things more than others. Screen brightness, low cell signal strength and location services are major culprits. If you are having battery problems, see this article:
http://www.scottyloveless.com/blog/2014/the-ultimate-guide-to-solving-iOS-batter y-drain
I don't know what it means being out of doors has to do with the question.
-
Question please: Hi I have an old first CS3 pro that I bought years ago and have just installed it on my computer and it works fine "I was wondering how I can know if his liceanced for two computers.
License of Adobe has always been 2 activations, so if you have only installed and activated on 1 computer, you're good to go for a 2nd
-
Due to a slow internet connection, I tried to download my purchase
software several times without success. Then, I continued to receive the
following message appears:
'TOO_MANY_DL_ATTEMPTS '.
If you have any questions, please contact Digital River Customer Service
to [email protected]. »
I contacted them and they said I need to contact Adobe.
no idea how to fix?
Thank you very much.
Available downloadable Setup files:
- Suites and programs: CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
- Acrobat: DC | XI, X | 9,8 | 9 standard
- Premiere Elements: 14, 13, 12, 11, 10: 9, 8, 7
- Photoshop Elements: 10, 12, 14, 11, 13. 9,8,7
- Lightroom: 6| 5.7.1| 5 | 4 | 3 | 2.7 (win),2.7 (mac)
- Captivate: 8 | 7 | 6 | 5
- Contribute: CS5 | CS4, CS3
Download and installation help links Adobe
Download and installation to Prodesigntools help links are located on the most linked pages. They are essential; especially steps 1, 2 and 3. If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions". window using the Lightroom 3 link to see these "important Instructions".
-
Cannot install After Effect free trial, the page shows "that we are now some questions, please try again later." If the problem persists, contact customer support. "for several days.
Is this problem will soon be resolved? Thank you!
You MUST have a 64-bit computer and operating system... What is your computer?
-Programs are supposed TO not view or download if they are not installed on your computer
MINIMUM for After Effects and Premiere Pro http://helpx.adobe.com/premiere-pro/system-requirements.html
-
After downloading the trial version free effect page works. It shows "that we are now some questions, please try again later." If the problem persists, contact customer support. "for a few days. This problem will be solved soon?
Hello
I tried the method via install CreativeCloudInstaller, it shows no AE in the application list.
It seems that I do not meet the minimum requirement for the installation of AE, my computer is 32-bit instead of 64-bit.
It would be more useful if they show the more accurate message in installer CC and the free trial link page in the Adobe Web site.
Thanks a lot for all media!
-
In order to become a distributor of volume Adobe Reader, (my computers have no internet access), I need to fill out the Distribution of Volume License Agreement, but will not accept an answer I gave to the question: "Please indicate the product or service name and description.
This form must be completed and submitted online. Also the browser Javascript must be activated.
https://distribute.Adobe.com/mmForm/index.cfm?name=distribution_form&PV=RDR
-
Line tool please, convertible of the text (image/maybe png), drop (subtitles), another example of image import: svg and other popular formats, that's all for now, greetings from the Turkey
Hello
You can publish these feature request on:- ideas for features in Adobe Muse
Kind regards
Rohit Nair
-
How to manage the pause embedded inside the CSV column line
Hello
I'm under pressure to make it work. I've already put this question on the forum of the APEX, but on reflection, I think that it relates more to PL/SQL rather than APEX APEX 4.1 having already utility to manage the Upload of CSV.
If you already read in the forum of the APEX, please ignore.
I'm sorry for that. Thanks for reading.
I need to develop an application that allows the user to upload a CSV file to a table of interface.
The APEX version on my workplace is 4.0.2.
I used the code of
http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:11000346061523
It all works fine until recently I find
If a column in a CSV file cotain a break line (or line spacing) for example (the tester copy and paste this text which has a line break on a column in a spreadsheet)
It is the first sentence.
It is the second sentence.
It will break the 'it's the second sentence In a new column.
The contents of the CSV read next to Notepad as below
Date of assessment, Date, assessment provider, name of the assessor, Court, first name, middle name, last name, PRN person record, NHI number, assisted defendant Y/N number, is dependent on O/N, Notes, primary of ethnicity, "the ethnic origin other, please specify", gender, currently in treatment O/N, another Substance, Substance of concern 5 specified
22/09/2012, Co name of the provider, Warren Edgley, Wellington, sale, 2545554, dgsdf,, 'is the first sentence.
It's the second sentence. ', Japanese, woman, b.
This is the CSV UTIL code, please help me how can I replace the line break to a space so that the download process is correct.
In my applications, I save these lines in a table rather than a collection of APEX because the number of columns can contain greater than 50.CREATE OR REPLACE PACKAGE BODY "CSV_UTIL" AS --strip the beginning and the end quotes, then replace double quotation with single FUNCTION de_quote (p_str IN VARCHAR2, p_enc_by IN VARCHAR2) RETURN VARCHAR2 IS v_str VARCHAR2(32767) := p_str; BEGIN IF (p_enc_by IS NULL) THEN RETURN p_str; ELSE IF SUBSTR(p_str,-1) = p_enc_by THEN v_str := SUBSTR(p_str,1,LENGTH(p_str)-1); END IF; IF SUBSTR(p_str,1,1) = p_enc_by THEN v_str := SUBSTR(v_str,2); END IF; RETURN REPLACE (v_str, p_enc_by || p_enc_by, p_enc_by ); END IF; END de_quote; PROCEDURE parse (p_str IN VARCHAR2, p_enc_by IN VARCHAR2, p_sep IN VARCHAR2) IS l_n NUMBER DEFAULT 1; l_in_quote BOOLEAN DEFAULT FALSE; l_ch NCHAR (1); l_len NUMBER DEFAULT NVL (LENGTH (p_str), 0); BEGIN IF (l_len = 0) THEN RETURN; END IF; g_words := g_empty; g_words (1) := NULL; FOR i IN 1 .. l_len LOOP l_ch := SUBSTR (p_str, i, 1); IF (l_ch = p_enc_by) THEN l_in_quote := NOT l_in_quote; END IF; IF (l_ch = p_sep AND NOT l_in_quote) THEN l_n := l_n + 1; g_words (l_n) := NULL; ELSE g_words (l_n) := g_words (l_n) || l_ch; END IF; END LOOP; g_words (l_n) := de_quote (g_words (l_n), CHR(10)); g_words (l_n) := de_quote (g_words (l_n), CHR(13)); FOR i IN 1 .. l_n LOOP g_words (i) := de_quote (g_words (i), p_enc_by); END LOOP; END parse; /* Author: Oleg Lihvoinen Company: DbSWH Changes: 10.02.2011, There was a miscalculation of the file line last position in case it is the end of file */ PROCEDURE upload (p_file_name VARCHAR2, p_collection_name VARCHAR2, p_enc_by IN VARCHAR2, p_sep_by IN VARCHAR2, p_rows NUMBER) IS v_blob_data BLOB; v_clob_data CLOB; v_clob_len NUMBER; v_position NUMBER; v_char NCHAR (1); c_chunk_len NUMBER := 1; v_line VARCHAR2 (32767) := NULL; v_data_array vcarray; v_rows NUMBER := 0; n_seq NUMBER := 1; dest_offset NUMBER := 1; src_offset NUMBER := 1; amount INTEGER := DBMS_LOB.lobmaxsize; blob_csid NUMBER := DBMS_LOB.default_csid; lang_ctx INTEGER := DBMS_LOB.default_lang_ctx; warning INTEGER; l_sep VARCHAR2(100) := CASE WHEN p_sep_by = '\t' THEN chr(9) ELSE p_sep_by END; BEGIN htmldb_collection.create_or_truncate_collection (p_collection_name => p_collection_name); -- Read blob from wwv_flow_files SELECT blob_content INTO v_blob_data FROM wwv_flow_files WHERE NAME = p_file_name; v_position := 1; DBMS_LOB.createtemporary (lob_loc => v_clob_data, CACHE => TRUE, dur => DBMS_LOB.SESSION ); DBMS_LOB.converttoclob (v_clob_data, v_blob_data, amount, dest_offset, src_offset, blob_csid, lang_ctx, warning ); v_clob_len := DBMS_LOB.getlength (v_clob_data); IF v_clob_len = 0 THEN RETURN; END IF; WHILE (v_position <= v_clob_len + 1) LOOP v_char := DBMS_LOB.SUBSTR (v_clob_data, c_chunk_len, v_position); v_line := v_line || v_char; v_position := v_position + c_chunk_len; -- When the whole line is retrieved and not end of file or end of file IF v_char = CHR (10) AND v_position < v_clob_len OR v_position = v_clob_len + 1 THEN parse (p_str => v_line, p_enc_by => p_enc_by, p_sep => l_sep); v_data_array := g_words; FOR i IN 1..g_words.count LOOP IF i <= 50 THEN v_data_array(i) := g_words(i); ELSE exit; END IF; END LOOP; FOR i IN g_words.count + 1..50 LOOP v_data_array(i) := null; END LOOP; v_rows := v_rows + 1; -- exit if uploaded specified number of rows IF p_rows IS NOT NULL AND v_rows > p_rows THEN EXIT; END IF; -- Store data to collection n_seq := htmldb_collection.add_member (p_collection_name => p_collection_name, p_c001 => v_data_array (1), p_c002 => v_data_array (2), p_c003 => v_data_array (3), p_c004 => v_data_array (4), p_c005 => v_data_array (5), p_c006 => v_data_array (6), p_c007 => v_data_array (7), p_c008 => v_data_array (8), p_c009 => v_data_array (9), p_c010 => v_data_array (10), p_c011 => v_data_array (11), p_c012 => v_data_array (12), p_c013 => v_data_array (13), p_c014 => v_data_array (14), p_c015 => v_data_array (15), p_c016 => v_data_array (16), p_c017 => v_data_array (17), p_c018 => v_data_array (18), p_c019 => v_data_array (19), p_c020 => v_data_array (20), p_c021 => v_data_array (21), p_c022 => v_data_array (22), p_c023 => v_data_array (23), p_c024 => v_data_array (24), p_c025 => v_data_array (25), p_c026 => v_data_array (26), p_c027 => v_data_array (27), p_c028 => v_data_array (28), p_c029 => v_data_array (29), p_c030 => v_data_array (30), p_c031 => v_data_array (31), p_c032 => v_data_array (32), p_c033 => v_data_array (33), p_c034 => v_data_array (34), p_c035 => v_data_array (35), p_c036 => v_data_array (36), p_c037 => v_data_array (37), p_c038 => v_data_array (38), p_c039 => v_data_array (39), p_c040 => v_data_array (40), p_c041 => v_data_array (41), p_c042 => v_data_array (42), p_c043 => v_data_array (43), p_c044 => v_data_array (44), p_c045 => v_data_array (45), p_c046 => v_data_array (46), p_c047 => v_data_array (47), p_c048 => v_data_array (48), p_c049 => v_data_array (49), p_c050 => v_data_array (50) ); -- Clear the line v_line := NULL; END IF; END LOOP; END; END;
I want to know how can replace these newline within a column to a space.
If anyone has any ideas, please let me know.
Thank you very much in advance.
Ann
-
Z51 - initial set-up configuration question - please help
This seems to be c reallysillyquetion b I'm nowhere fast.
I tried to start using my new Lenovo Z51 but I can't go beyond where it says "help us to protect your information.
I selected a different email for a security code to send to account.
Then he said: "to verify that this is your email address enter below and click 'next' to receive your code.
So I got my windows account email address - you click on "next" and get to the next screen
The next screen has message saying "enter the code you received - if * is the address of e-mail on your account, we will send you a code."
But I do not get anything - so when it asks me to enter my e-mail address means enter the same address that I chose to have the sent code, rather than my windows email account?
Please can someone help save my sanity?
Helen
Mod edit: System model added to the subject line to improve visibility / clarity
Ignore my question - after trying both options again, I actually sent the code, able to move to the next step. Hoping that there are no more problems.
-
Simple Data Acquisition question please Help!
I have problems with a simple LabVIEW program.
I'm analyzing two inputs voltage and at the moment I have the VI work so that both are analyzed at 10 k Hz simultaneously and displayed in two tables of waveform. What I would do, it is write values for them at 1 Hz in an excel spreadsheet or a text file with the time, the value of the first and the second value. So I would create an array of [value1, value2] and export that to a line in a text file, I can analyze and then later in excellent. I want to keep it that way for the duration of the program. In addition, it is possible to have the LabVIEW to generate such a table statistics once the user closes the loop, it would be even better.
I can only assume that it is not too complicated, but I've never done any export data and just a quick explanation probably will save me a lot of time. Any help would be great, even if it's just to say "use this feature. Thank you very much.
Pieter
Pieter,
Please post on the Forums of NOR. I could take an example that was similar to yours and organize data in the format you want. I've included a photo as well as saved for LabVIEW 8.6 VI. I took the data from the berries that were from the channel to read and handle while he was in the format of time, channel 0 channel 1. Hope this helps and let me know if you have any questions. Thank you!
-
Hello community,
1. I guess, it should be the way to do not change the settings (tempo and so on) by moving the region. Any idea, please.
2. any time I opened instruments they opened as controls after what I had to change the editor in EXS24 or Vienna all Pro (cocoa). How to get rid of it?
Thanks in advance
For your second question...
Preferences-> display-> mixer and uncheck open to controls...
-
Return policy for the laptop. 2 questions please.
Hello world!
I bought some computers laptops and desktops from HP over the years but never had back none of them until my recent order. I recently placed an order on the laptop but I found a better computer hp laptop at bestbuy, so I called and cancelled the order (only after 15 hours of the order) but HP CS rep would not let me Cancel. She told me to just leave it delivered and return it once I received the laptop. HP will pay for return shipping charges and give me a FULL REFUND; which means that they don't give me the refund less shipping fees. I asked to confirm what she has told me that I will receive my full refund for my order and HP will send me a return shipping label at their cost. If this is true what she told me, then HP has the best customer service out there.
My question to anyone who has purchased and returned HP stuff is it is true about what the CS rep tells me? Moreover, I get free shipping on my order if it makes a difference. I pray for your opinion on this please.
Thank you all for your time and happy thanksgiving to all!
Micca1234
See the following page HP Shopping "Returns and exchanges" on their return policy / exchange:
Return exchange
Exchange & return policy
Return period
We encourage you to try your products immediately so that if there is a problem, you can return them before the return deadline. We accept returns and exchanges up to 21 days after childbirth, except on open software box, printers Designjet Z2100 series, HP Color LaserJet CP6015dn printer, and gift cards (except where required by law). After the period of 21 days, you can get support for questions of HP customer service product.
CreditsCredit for Returns or exchanges is given when confirm us the receipt of the goods. Please be aware that your financial institution may take 5 to 7 business days to process your credit and let the account in your account.
RefundsTax (if any) is refunded with returns.
Original shipping and handling are not refundable.
When you return the items in a group of items purchased, the remaining amount spent maybe is more eligible for a discount, you may have received (for example, for gifts with purchase, free gift, purchase in quantity). If this is the case, the discount is subtracted the price paid for the returned item. To receive a full refund, all items in the original purchase must be returned.
-
Touch pad questions, please help.
Laptop HP Pavilion
Model: 15-n096sa
Product: F4T58EA #ABU
OS: Windows 8.1 Home Premium X 64
I installed Windows 8.1 Home Premium X 64 on my laptop last week, he had originally version 8 is installed when I bought a month ago. Since the upgrade of the OS of my touchpad is no longer allows me to scroll with two fingers or enlarge the pages, use the right click function by tapping with two fingers & also bring up the options in a Sling. All I can do now is to move the pointer and click or double-click with the pad.
Can someone please help me solve this problem because it drives me crazy?
Thanks in advance.
Hello EnergySyndicate,
Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the Forums of HP, I would like to draw your attention to the Guide of the Forums HP first time here? Learn how to publish and more.
I understand that you are having problems with certain features of the touch pad doesn't work does not correctly. I think it's a question of settings. I'm you provide a HP support document: use and troubleshooting of the TouchPad and ClickPad (Windows 8) that will guide you in how to adjust settings and ensure that the common gestures of the Touchpad is correctly configured.
I think that this will solve your problem of Touchpad and allow you to go back to listening to your computer. Thanks for posting on the HP Forums. Have a great day!
Maybe you are looking for
-
How can I add a prefix digital (such as an area code) to several cells in a column?
I have a column of numbers without area codes. I need to add the same area code to each cell. How am I able to do this? Bonus question would be, I have a column of numbers with and without area codes. How can I add an area (same area code) code to
-
Acquire GigE camera data using labview CIN or DLL to call.
I am tring to acquire data from a basler runner line CCD camera (GigE). Because the NI Vision Development Module is not free, and the camera provide a C++ API and C and also some examples, so I plan on using the function CIN or call DLLS in labview t
-
Por cambio of the placa base that era intel y ahora're ansu
Cuando to instalo este CD lablaca era based Intel, y ahora're ANSU, palabras del tenico textuales, me dijo what lo hiciera adgs, para as mandaran a saber las plots automaticas. A greeting
-
Security issue with my computer
I could not connect on my laptop, the said invalid user profile. Then I found a unauthorized access to my Microsoft Account which took place the same day a security update has been through. I see how to fix my user profile, but ask yourself what ha
-
"A communication failure has occurred" when you transfer the file in Simulator
I'm under Blackberry MDS Services 4.1.2 and using device Blackberry 9530 Simulator Simulator. v4.7.0.75 -Only the Blackberry browser is an option on this Simulator. -The Web page is a form that has an input file browse that selects an image file on