try 'substring' instead of 'substr'.

---------- "Don" <[EMAIL PROTECTED]> writes:

Return-Path: <[EMAIL PROTECTED]>
Received: from mx11.lax.untd.com (mx11.lax.untd.com [10.130.24.71])
        by maildeliver04.nyc.untd.com with SMTP id AAA9C453SATSGSQA
        for <[EMAIL PROTECTED]> (sender 
<[EMAIL PROTECTED]>);
        Tue, 21 Jan 2003 11:02:56 -0500 (EST)
Received: from web.mysql.com (web.mysql.com [213.136.49.183])
        by mx11.lax.untd.com with SMTP id AAA9C453RAZK776S
        for <[EMAIL PROTECTED]> (sender 
<[EMAIL PROTECTED]>);
        Tue, 21 Jan 2003 08:02:55 -0800 (PST)
Received: (qmail 3943 invoked by uid 7797); 21 Jan 2003 15:35:06 -0000
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm (http://www.ezmlm.org)
List-ID: <mysql.mysql.com>
Precedence: bulk
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
Delivered-To: mailing list [EMAIL PROTECTED]
Received: (qmail 3784 invoked from network); 21 Jan 2003 15:34:55 -0000
Message-ID: <008001c2c162$96e4fba0$c889cdcd@enterprise>
From: "Don" <[EMAIL PROTECTED]>
To: "msql list" <[EMAIL PROTECTED]>
Subject:  Trying to update data in a table - getting an error
Date: Tue, 21 Jan 2003 10:34:20 -0500
MIME-Version: 1.0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Hi,
RESENT DFUE TO TYPO

I want to change a field in a table.  Currently the data is in theformat -->
4818.50.00
I want to remove the decimal points so that it is like --> 48185000
I tried the sql code below but am getting a syntax error.  Can someone
please point out the error of my ways?

UPDATE DocComms SET ItemHSCode = concat(substr( ItemHSCode, 1, 4 ),
substr( ItemHSCode, 6, 2 ), substr( ItemHSCode, 9, 2 ))

Thanks,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to