Re: Can append word into varchar column in Update statement?

2004-08-25 Thread SGreen
Yes, UPDATE ... SET... is exactly what you would use. Just set the column 
to be the combined value of the two values.
Please read: http://dev.mysql.com/doc/mysql/en/UPDATE.html

UPDATE tablename
SET fieldname = 'new list of values that you wanted'
WHERE _where_conditions_

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Monet [EMAIL PROTECTED] wrote on 08/24/2004 07:49:37 PM:

 Hi all,
 
 I though it is impossible to do that but I like check
 with you guys in case it is just because I never heard
 it.
 I have a table with a text column. Is there any way I
 can append some word into this field when I update the
 table?
 For instance,
 Table temp, column ReviewComments, data type of
 ReviewComments is varchar.
 Value in  ReviewComments is PSRC. 
 After update, value in ReviewComments should be
 PSRC, WHC
 
 Can I do that by using UPDATE  SET . 
 
 Thanks a lot.
 
 Monet
 
 
 
 
 ___
 Do you Yahoo!?
 Win 1 of 4,000 free domain names from Yahoo! Enter now.
 http://promotions.yahoo.com/goldrush
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 



Re: Can append word into varchar column in Update statement?

2004-08-25 Thread Michael Stassen
Monet wants to append something to the current value, so I think CONCAT() is 
needed:

  UPDATE temp
  SET ReviewComments = CONCAT(ReviewComments, ', WHC')
  WHERE ... ;
Michael
[EMAIL PROTECTED] wrote:
Yes, UPDATE ... SET... is exactly what you would use. Just set the column 
to be the combined value of the two values.
Please read: http://dev.mysql.com/doc/mysql/en/UPDATE.html

UPDATE tablename
SET fieldname = 'new list of values that you wanted'
WHERE _where_conditions_
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Monet [EMAIL PROTECTED] wrote on 08/24/2004 07:49:37 PM:

Hi all,
I though it is impossible to do that but I like check
with you guys in case it is just because I never heard
it.
I have a table with a text column. Is there any way I
can append some word into this field when I update the
table?
For instance,
Table temp, column ReviewComments, data type of
ReviewComments is varchar.
Value in  ReviewComments is PSRC. 
After update, value in ReviewComments should be
PSRC, WHC

Can I do that by using UPDATE  SET . 

Thanks a lot.
Monet

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


Can append word into varchar column in Update statement?

2004-08-24 Thread Monet
Hi all,

I though it is impossible to do that but I like check
with you guys in case it is just because I never heard
it.
I have a table with a text column. Is there any way I
can append some word into this field when I update the
table?
For instance,
Table temp, column ReviewComments, data type of
ReviewComments is varchar.
Value in  “ReviewComments” is “PSRC”. 
After update, value in “ReviewComments” should be
“PSRC, WHC”

Can I do that by using UPDATE … SET …. 

Thanks a lot.

Monet




___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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