[EMAIL PROTECTED] wrote:
>> From: Bruce Therrien <[EMAIL PROTECTED]>
>> Date: 2003/11/28 Fri PM 01:42:14 CST
>> To: [EMAIL PROTECTED]
>> Subject: Retrieving info from a Joined column
>>
>> We have a column in our table that has
>> new info added each time using a JOIN function.
The data sample makes me rather think
update table set field=CONCATE(field,':','more')

>> The data is separated using a  :  separator.
> This doesn't answer your question...
> However, note that in most instances using columns with multiple
> values is a bad idea in a relational database.  If possible, you'd be
> better off with a design that does not require multiple values in a
> single column.
I'ld second that. However, to maintain compatible output to your Perl script
consider GROUP_CONCAT http://www.mysql.com/doc/en/GROUP-BY-Functions.html

>> How does one retrieve this info from the colomn and put it
>> into list format,
In Perl there is 'split'; takes a 'field delimiter and a string to return an
array of strings.

>> or check for duplicates,
Using 'where NOT( field LIKE '9807:' and field LIKE ':9807' and field LIKE
':9807:' ' ) within your UPDATE should do the tric

>> or do a search in the column for  a certan string.
On an existing data base you might consider LIKE
... where field LIKE '9807:' and field LIKE ':9807' and field LIKE ':9807:'
Adding a ':' to both the beginning and end of the content would obsolete the
first and second part of the above.
However, you need to 'shift' and 'pop' a pair of empty fields in Perl AND
change to CONCATE(field,'more',':')

HansH


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to