comma-separated

I would like to generate view in oracle that converts comma-separated entry to columns

I would like to generate view CUSTOMER, CUSTOMER_ID, PRODUCTS ABC INC 1 A=XYX, B=ZZZ DEF CO 2 A=XYX, B=ZZZ, C=WWW GHI LLC 3 B=ZYX Would like the view to be something like CUSTOMER, CUSTOMER_ID, A B C ABC INC 1 XYX ZZZ DEF CO 2 XYX ZZZ WWW GHI LLC 3 ...

How do I know if a file is tab or space delimited in Perl?

I am uploading a file to a Perl program from from an HTML page. After the file has been uploaded I want to determine whether the file is either space or tab delimited and all the values are integers. If this is not the case then I want to output some message. I was thinking of reading every character of the file and checking if it's...

Convert multiple rows into one with comma as separator

If I issue SELECT username FROM Users I get this result: username -------- Paul John Mary but what I really need is one row with all the values separated by comma, like this: Paul, John, Mary How do I do this? ...

How to handle comma separated decimals and floats in CF?

I have to validate form values as integers. I have tried something like this: <cfloop collection="#form#"> <cfif form.value eq int(form.value)> #form.value# is an integer </cfif> </cfloop> It works as long the user does not input comma as the decimal separator, which is the default way of doing this here in Germany. I have to us...

BASH MySQL Query to Comma Separated File

I have the following bash script: #!/bin/sh MYSQLHOST="mysql.remote-host.com" MYSQLDB="mysqldb" MYSQLTABLE="table" MYSQLUSER="user" MYSQLPASS="pass" MYSQLDUMP="Report/report.csv" LOG="Report/report.log" MYSQLOPTS="--user=${MYSQLUSER} --password=${MYSQLPASS} --host=${MYSQLHOST} ${MYSQLDB}" echo "Report Begin: $(date)" echo "MySQL Du...

Building a comma separated list?

hi there I'm tryin to use SQL to build a comma separated list of cat_id's the code is: declare @output varchar(max) set @output = null; select @output = COALESCE(@output + ', ', '') + convert(varchar(max),cat_id) edit: changed '' to null, STILL same. but the output im getting is like so: , 66 , 23 the leading comma sh...

use linq aggregate function to build xml string?

I've used this in the past to build comma seperated lists: var list = new List<int>{1,2,3}; var retVal = list.Select(i=>i.ToString()).Aggregate((a,b) => a+", "+b); Works great. I'm trying to do the same sort of thing to 'wrap' each element as an xml node. Something like: Aggregate((a, b) => string.Format("<ID>{0}</ID><ID>{1}</ID>",...

Consolidated: SQL Pass comma separated values in SP for filtering

I'm here to share a consolidated analysis for the following scenario: I've an 'Item' table and I've a search SP for it. I want to be able to search for multiple ItemCodes like: - Table structure : Item(Id INT, ItemCode nvarchar(20)) - Filter query format: SELECT * FROM Item WHERE ItemCode IN ('xx','yy','zz') I want to do this dynamic...

Add comma-separated value of grouped rows to existing query

I've got a view for reports, that looks something like this: SELECT a.id, a.value1, a.value2, b.value1, /* (+50 more such columns)*/ FROM a JOIN b ON (b.id = a.b_id) JOIN c ON (c.id = b.c_id) LEFT JOIN d ON (d.id = b.d_id) LEFT JOIN e ON (e.id = d.e_id) /* (+10 more inner/left joins) */ It joins quite a few tables and return...

Comma Seperated Values and LIKE php/mysql Troubles

The Set up This is more or less a follow up question to something I had previously posted regarding comma separated values (explode,implode). Here's the scenario which has been stomping me the last few days as I'm a noob--sorry for the lengthy post. I'm passing a variable via the url (index.php?id=variable), I then check the database t...

MySQL: can I do a for-each on a comma separated field?

I just ran into a problem. I know these integers, $integers: 3,5,15,20. I only want to select the rows from this following table where all comma separated INT's from the field NUMBERS are found. TABLE: number_table Uid Numbers ------------------------ 1 3,5,15 OK, since all of NUMBERS are in $integers 2 5,15,20 OK, since all ...

Regular Expression to break row with comma separated values into distinct rows

I have a file with many rows. Each row has a column which may contain comma separated values. I need each row to be distinct (ie no comma separated values). Here is an example row: AB AB10,AB11,AB12,AB15,AB16,AB21,AB22,AB23,AB24,AB25,AB99 ABERDEEN Aberdeenshire The columns are comma separated (Postcode area, Postcode districts,...

Create spring beans, based on a comma-separated list of classes

Is there a way in Spring to create a collection, or array, of beans, based on a comma-separated list of classes. For example: package mypackage; public class Bla { private Set<MyBean> beans; public void setBeans(Set<MyBean> beans) { this.beans = beans; } } With the application context: <bean id="bla" class="mypackage.Bla"> <pro...

Regex: Comma delimited integers

Hi Guys, I'm trying to create a regex that accept: An empty string, a single integer or multiple integers separated by a comma but can have no starting and ending comma. I managed to find this, but I cannot undertsand how to remove the digit limit ^\d{1,10}([,]\d{10})*$ ...

Regex to extract a font family list from a CSS font declaration

I am trying to create a .NET Regex to parse a CSS font declaration, which takes following form: font: italic small-caps bold xx-small 3.0em "Times New Roman", Times, serif; According to the CSS specification, all of the elements of the declared value are optional, and I have successfully created Regexes that match the first five eleme...

Easiest way of working with a comma separated list

I'm about to build a solution to where I receive a comma separated list every night. It's a list with around 14000 rows, and I need to go through the list and select some of the values in the list. The document I receive is built up with around 50 semicolon separated values for every "case". How the document is structured: "";"2010-10-1...