Re: SELECT with replacement chars

2008-12-05 Thread spacemarc
thanks, it works fine (on mysql 4 and 5) > SELECT CONCAT(LEFT(myfield,LENGTH(myfield) - 3), '***') FROM table; -- Scripts: http://www.spacemarc.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: SELECT with replacement chars

2008-12-05 Thread Jerry Schwartz
>-Original Message- >From: spacemarc [mailto:[EMAIL PROTECTED] >Sent: Friday, December 05, 2008 8:50 AM >To: MySQL >Subject: SELECT with replacement chars > >Hi >how can i replace, in a SELECT query, the last 3 numbers with asterisks? >from 0123456789 to 0123

RE: SELECT with replacement chars

2008-12-05 Thread Weston, Craig (OFT)
>Hi >how can i replace, in a SELECT query, the last 3 numbers with asterisks? >from 0123456789 to 0123456*** My psudocode for this would be something like: Select CONCAT(left$(`field`,(LENGTH(a)-3),'***') >From `table` But there might be more efficient ideas out there. --

SELECT with replacement chars

2008-12-05 Thread spacemarc
Hi how can i replace, in a SELECT query, the last 3 numbers with asterisks? from 0123456789 to 0123456*** -- Scripts: http://www.spacemarc.it -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]