![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
![]() |
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 ![]() | 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 ![]() | 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 Wednesday, July 2, 2025 at 06:46 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |