Well I would need to do something similar to the second example. But how
would I do it if phone number is just one generic field- not 3 like you've
shown? I tried
 '(' + left(TELEPHONE, 3) + ')' which gave me a weird result adding a period
to it (3.4)  
 RIGHT(TELEPHONE,4) gives a number that isn't even a listed in the
database....and I wasn't quite sure how to extract the middle portion...
ho hum....

-----Original Message-----
From: Billy Cravens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 11:47 AM
To: CF-Talk
Subject: RE: SQL quicky


Totally depends on what you're doing (select, update, insert) and where
your data is coming from.

But something like:
SELECT * FROM AddressBook
WHERE PhoneNumber = '(#areacode#) #exchange#-#suffix#'


Or maybe


SELECT '(' + areacode + ') ' + exchange + '-' + suffix AS PhoneNumber
FROM AddressBook WHERE LastName = 'Doe'

---
Billy Cravens
Web Development, EDS
[EMAIL PROTECTED]


-----Original Message-----
From: Janine Jakim [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 7:21 AM
To: CF-Talk
Subject: OT:SQL quicky


How do I format a phone number (###) ###-#### within my cf sql
statement? My backend is sql 2000. Thanks in advance.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to