Kinda sorta but not really.... Your SELECT isn't against a table so I don't what TotalStatus1 and TotalStatus2 are . Are they fields? Are they variables?
Assuming you have a tables called "stores" and you wanted to update one of two columns based on a value in a third: UPDATE stores SET TotalStatus1 = IF(statusID=1, TotalStatus1+1,TotalStatus1) , TotalStatus2 = = IF(statusID=2, TotalStatus2+1,TotalStatus2) Or if you want to see an incremented value in a SELECT statement: SELECT statusID , IF(statusID=1, TotalStatus1+1,TotalStatus1) as TotalStatus1 , IF(statusID=2, TotalStatus2+1,TotalStatus2) as TotalStatus2 FROM <some table name> Yours, Shawn Green Database Administrator Unimin Corporation - Spruce Pine ColdFusion Lists <coldfusionlists@ To: [EMAIL PROTECTED] yahoo.com> cc: Fax to: 06/25/2004 05:48 Subject: Using CASE for store values PM Hi all it's possible to use the CASE clause in MySQL like this: SELECT statusID, Case(statusID = 1, TotalStatus1=TotalStatus1 + 1) Case(statusID = 2, TotalStatus2 = TotalStatus2 +1) It's possible? How to do that? Thanx for your time. Crie seu Yahoo! Mail, agora com 100MB de espaço, anti-spam e antivírus grátis! ----- Message from Alejandro Heyworth <[EMAIL PROTECTED]> on Fri, 25 Jun 2004 15:48:59 -0400 ----- To: [EMAIL PROTECTED] Subject: Memory to Memory INSERTS Hi! I'm looking for a better way to insert large numbers of rows from a client application that is sampling physical data in real-time. In our case, we are using a C "double hipvalues[1000000]" cyclical array to buffer our sampled values. We're currently creating large query strings similar to: INSERT DELAYED INTO hipjoint VALUES (hipvalues[0]),(hipvalues[1]),(hipvalues[2]),(hipvalues[3]),etc... We would like to continue to insert our values directly from our client app without first having to dump the data to a temp file and LOAD DATA INFILEing it periodically. Any ideas? Config values of interest: key_buffer_size = 4G bulk_insert_buffer_size = 1024M We are using MySQL 4.1.2. Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]