delimited

“Connect By” to generate rows from multiple delimited string

和自甴很熟 提交于 2019-12-11 11:58:16
问题 we can use "Connect By" to generate rows from a delimited string in oracle. like: SELECT Rn ,Regexp_Substr(data, '[^,]+', 1, LEVEL) Data FROM (SELECT 1 Rn ,'id:a,val:b,desc:c' data FROM Dual) Idata CONNECT BY Regexp_Substr(data, '[^,]+', 1, LEVEL) IS NOT NULL I want to use the inner query as a union all of a few more records. Something like: SELECT Rn ,Regexp_Substr(data, '[^,]+', 1, LEVEL) Data FROM (SELECT 1 Rn ,'id:a,val:b,desc:c' data FROM Dual UNION ALL SELECT 2 Rn ,'id:a2,val:b2,desc:c2

Convert tab delimited to XTS within R?

二次信任 提交于 2019-12-11 05:19:56
问题 I have tab delimited file in format of: Date Time Last LastSize TotVol Bid Ask TickID BidSize AskSize 8/23/2012 0:00:00 0.95711 1 20670 0.95711 0.95742 0 0 0 8/23/2012 0:00:04 0.9571 1 20671 0.9571 0.9574 0 0 0 I am using the function to create an XTS within R. > EURUSD <- as.xts(read.zoo("C:\\Users\\caustic\\Documents\\DTN\\IQFeed\\EURUSD.FXCM_1.txt", + sep='\t', + tz='', + header=T, + format='%d/%m/%Y %H:%M:%S')) I get an error of: Error in as.POSIXlt.character(x, tz, ...) : character

Upload tab delimited txt file using form, then make into PHP arrays?

无人久伴 提交于 2019-12-08 08:43:37
问题 I'm trying parse a tab delemited text file into a set of PHP arrays, and help would be very much appreciated. The .txt wil look like this (tab delimited not spaces) data1a data1b data1c data1d data2a data2b data2c data2d data3a data3b data3c data3d data4a data4b data4c data4d and so on I wish the PHP arrays to look like this $arrayA = array('data1a', 'data2a', 'data3a', 'data4a'); $arrayB = array('data1b', 'data2b', 'data3b', 'data4b'); $arrayC = array('data1c', 'data2c', 'data3c', 'data4c');

Oracle PL-SQL : Import multiple delimited files into table

和自甴很熟 提交于 2019-12-08 05:20:35
问题 I have multiple files (f1.log, f2.log, f3.log etc) Each file has the data in ; & = delimited format. (new lines are delimited by ; and fields are delimited by = ) e.g. data of f1: 1=a;2=b;3=c data of f2: 1=p;2=q;3=r I need to read all these files and import data into table in format: filename number data f1 1 a f1 2 b f1 3 c f2 1 p [...] I am new to SQL. Can you please guide me, how can do it? 回答1: Use SQL*Loader to get the files into a table. Assuming you have a table created a bit like:

Oracle PL-SQL : Import multiple delimited files into table

一笑奈何 提交于 2019-12-07 03:25:27
I have multiple files (f1.log, f2.log, f3.log etc) Each file has the data in ; & = delimited format. (new lines are delimited by ; and fields are delimited by = ) e.g. data of f1: 1=a;2=b;3=c data of f2: 1=p;2=q;3=r I need to read all these files and import data into table in format: filename number data f1 1 a f1 2 b f1 3 c f2 1 p [...] I am new to SQL. Can you please guide me, how can do it? Use SQL*Loader to get the files into a table. Assuming you have a table created a bit like: create table FLOG ( FILENAME varchar2(1000) ,NUM varchar2(1000) ,DATA varchar2(1000) ); Then you can use the

Upload tab delimited txt file using form, then make into PHP arrays?

北战南征 提交于 2019-12-07 02:05:32
I'm trying parse a tab delemited text file into a set of PHP arrays, and help would be very much appreciated. The .txt wil look like this (tab delimited not spaces) data1a data1b data1c data1d data2a data2b data2c data2d data3a data3b data3c data3d data4a data4b data4c data4d and so on I wish the PHP arrays to look like this $arrayA = array('data1a', 'data2a', 'data3a', 'data4a'); $arrayB = array('data1b', 'data2b', 'data3b', 'data4b'); $arrayC = array('data1c', 'data2c', 'data3c', 'data4c'); $arrayD = array('data1d', 'data2d', 'data3d', 'data4d'); And I need the .txt file uploaded by a simple

Regular expression to allow comma and space delimited number list

落爺英雄遲暮 提交于 2019-12-04 03:28:38
问题 I want to write a regular expression using javascript or jquery to allow comma delimited list of numbers OR space delimited numbers OR comma followed by a space delimited numbers OR a combination of any of the above ex anything that is not a digit, space or comma must be rejected SHOULD PASS 111,222,333 111 222 333 111, 222, 333 111,222,333 444 555 666, 111, 222, 333, should NOT pass: 111,222,3a 3a 111 222 3a etc etc I tried the code below they seemed to work however when I typed 3a as a

Parsing a tab delimited file into separate lists or strings

老子叫甜甜 提交于 2019-12-03 07:14:58
问题 I am trying to take a tab delimited file with two columns, Name and Age, which reads in as this: 'Name\tAge\nMark\t32\nMatt\t29\nJohn\t67\nJason\t45\nMatt\t12\nFrank\t11\nFrank\t34\nFrank\t65\nFrank\t78\n' And simply create two lists, one with names (called names, without heading) and one with the ages (called ages, but without ages in the list). 回答1: Using the csv module, you might do something like this: import csv names=[] ages=[] with open('data.csv','r') as f: next(f) # skip headings

How can I get 2nd and third column in tab delim file in bash?

妖精的绣舞 提交于 2019-12-02 21:48:15
I want to use bash to process a tab delimited file. I only need the second column and third to a new file. cut(1) was made expressly for this purpose: cut -f 2-3 input.txt > output.txt Cut is probably the best choice here, second to that is awk awk -F"\t" '{print $2 "\t" $3}' input > out expanding on the answer of carl-norum, using only tab as a delimiter, not all blanks: cut -d$'\t' -f 2-3 input.txt > output.txt don't put a space between d and $ 来源: https://stackoverflow.com/questions/6312564/how-can-i-get-2nd-and-third-column-in-tab-delim-file-in-bash

Parsing a tab delimited file into separate lists or strings

安稳与你 提交于 2019-12-02 20:48:27
I am trying to take a tab delimited file with two columns, Name and Age, which reads in as this: 'Name\tAge\nMark\t32\nMatt\t29\nJohn\t67\nJason\t45\nMatt\t12\nFrank\t11\nFrank\t34\nFrank\t65\nFrank\t78\n' And simply create two lists, one with names (called names, without heading) and one with the ages (called ages, but without ages in the list). Using the csv module , you might do something like this: import csv names=[] ages=[] with open('data.csv','r') as f: next(f) # skip headings reader=csv.reader(f,delimiter='\t') for name,age in reader: names.append(name) ages.append(age) print(names) #