delimited-text

MySQL Split to use in "SELECT WHERE IN" statement

I've been scouring various MySQL sites in the hope of finding something that will allow me to turn this: var parameters = "a,b,c,d"; // (Could be any number of comma-delimited values) Into this (assuming that my parameters are somehow becoming the values you see in the IN block): SELECT * FROM mytable WHERE parametertype IN('a', 'b',...

edit delimited string with regular expression

hello everyone, i have a string which i want to edit a part of it. the string is like "1:5,7:9,13:20,130:510,134:2," now all i want to do is remove the first part of those numbers like "5,9,20,540,2," i tried a bunch of combinations but didn't get what i expected. Regex rx = new Regex("[:]\\d+[,]"); foreach (Match mx in rx.Matc...

How to generate tab-delimited txt file?

Hi I want to use SQL SERVER 2005 commands to generate tab-delimited file. I want to create a complex query and give it to something (say a function) to export data with columns names into a tab-delimited file. If u don't know something doing this, suggest an idea that reduces the headache of doing it from scratch using C#. AHH, I am...

read textfile with delimiter in php

I have three eintries in a textfile.txt: 20100220 Hello Here is Text \n blah \t even | and & and so on... I want to read each entrie (line) as a new string in php. I thought of using fopen and fgets. But: Since I'm using special characters like \n in the last line, fgets() would not work because it will terminate the string at \n, rig...

How do I get the javascript split function to extract null values from a delimited string

I'm trying to parse a delimited string using the javascript split function. I'm using a double character delimiter. So for e.g. if the string contains employee related data with the following fields: Emp Id (mandatory) Name (mandatory) Age (optional) Mobile No (optional) and the delimiter used is |* (i.e. pipe followed by star) I m...

which delimeter to use while spliting String

I need to split this line string in each line, I need to get the third word(film name) but as you see the delimeter is one big blank character in some cases its small like before the numbers at the end or its big as in front of numbers at front. I tried using string split with(" ") regex, and also \t but get the out of the bounds error...

Importing a large delimited file to a MySQL table

I have this large (and oddly formatted txt file) from the USDA's website. It is the NUT_DATA.txt file. But the problem is that it is almost 27mb! I was successful in importing the a few other smaller files, but my method was using file_get_contents which it makes sense why an error would be thrown if I try to snag 27+ mb of RAM. So how...

Sort delimited string in SSIS (via script, tsql, other)

I have 700k-1M rows coming in with a comma delimited field (among others). I need to keep this column intact, but sort the rows so that I can determine duplicates. In this business case, a,3,null,40 is the same as null,40,a,3 and so on. This can be achieved via stored proc, script component, tsql. I found this component which does exa...

How to specify a specific delimiter when reading a text file from PHP?

I have a text file, I am told the delimiter is as quoted below. My question is how to I set the delimiter inside PHP? ie this would set it as TAB delimiter in my script $csv->delimiter = "\t"; # tab delimited Field Separator (FS): SOH (ASCII character 1) Record Separator (RS) : STX (ASCII character 2) + "\n" For example, these ...

Is there a single regular expression to replace a number in a delimited list?

I have a string that can range from the empty string to an arbitrary list of comma delimited numbers. For example: "1,2,3" Unfortunately as I write the code to remove an element I have a bunch of if statements--mainly to deal if it is the first, last, or only element in the list. I keep thinking there has got to be a better way! For ...

Why is tab delimited data quicker to process than csv

Would anybody know why pasting tab delimited data from Excel into a html textarea is a lot faster than pasting comma delimited data from editpad?? ...

Converting troublesome delimited PDF to Excel

I'm trying to convert this delimited PDF to an excel (or some other delimited format). Using Adobe Acrobat 9, I attempt to save it and copy it) as Excel but it gives the error message "BAD PDF; error in processing fonts. [348]". I'm open to any solution that will create a delimited file, ranging from using Adobe Acrobat, to programmin...

C#: string[] to delimited string. Is there a one-liner?

What I'd prefer is something like: string[] strArray = {"Hi", "how", "are", "you"}; string strNew = strArray.Delimit(chDelimiter); However, there is no such function. I've looked over MSDN and nothing looked to me as a function that would perform the same action. I looked at StringBuilder, and again, nothing stood out to me. Does an...

Create delimited string from a row in stored procedure with unknown number of elements

Using SQL Server 2000 and Microsoft SQL Server MS is there a way to create a delimited string based upon an unknown number of columns per row? I'm pulling one row at a time from different tables and am going to store them in a column in another table. ...

Extracting data from a tab-delimited file with JavaScript

I'm trying to extract data from a data file that's tab-delimited (in some parts), and really seems like it's going to be a headache to work out (I reallw wish they could just have CSV-ed it). Here's the data: http://www.fededirectory.frb.org/FedACHdir.txt Here's the format description: www.fededirectory.frb.org/format_ACH.cfm I'd li...

Best/common practice to delimit values in C when printing them.

I tried the search function but only found questions regarding reading in comma/space delimited files. My question is however, how do you usually approach this. Say I have a list/array/... of values, like {1, 2, 3, 4} and want to print them with a delimiter. The simplest version would be something like: #include <stdio.h> int main(...

MySql : Break string by delimiters (^A)

I have a string that is of the: type 'field1^Afield2^Afield3^A' I need to break this string and get one of the fields. All the string functions I see in MySql that help you break by delimiter expect a string as the delimiter , example: SUBSTRING_INDEX("Hello. Break this. for me", ".", 1) would give = "Hello" How do i break mu string...

Import a .fil file in OpenOffice calc

Hello, I have the exe of an old VB application. It seems that this app saves the data in .hat files, txt files, and a .fil file. I'm trying to create a new app and I want to migrate the data in OpenOffice Base. I managed to migrate the .txt, .hat files but I have a problem migrating the .fil file. I open it in Calc or Writer but I can n...