Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
Is there a way to format a string in an SQL statement? |
Sat, May 10 2014 7:41 AM | Permanent Link |
Aaron Taylor | Hi all, Is there a way to format a string in SQL ?
Example: SELECT Id, Name, Phone FROM Contacts Returns: 1, Tony, 0411234234 I would like to return: 1, Tony, (0411) 234-234 |
Sat, May 10 2014 7:59 AM | Permanent Link |
Fernando Dias Team Elevate | Aaron,
SELECT Id, Name, '(' + SUBSTRING(Phone, 1, 4) + ') ' + SUBSTRING(Phone, 5, 3) + '-' + SUBSTRING(Nome, 8, 3) FROM Contacts The other option would be to write a user defined function, but if you use Client/Server that means recompiling the server. -- Fernando Dias [Team Elevate] |
Sat, May 10 2014 8:02 AM | Permanent Link |
Fernando Dias Team Elevate | Aaron,
Correction: It should be "Phone" instead of "Nome". -- Fernando Dias [Team Elevate] |
Sat, May 10 2014 9:14 AM | Permanent Link |
Aaron Taylor | Thank You
|
This web page was last updated on Tuesday, May 14, 2024 at 07:14 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |