RE: SQL quicky

2001-10-04 Thread Janine Jakim
that is screwy- all the others (ie: city, state zip) etc are fine. Any ideas? -Original Message- From: Stephen Hait [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 3:16 PM To: CF-Talk Subject: RE: SQL quicky Sorry, I don't understand what you're trying to accomplish here

RE: SQL quicky

2001-10-04 Thread Steven Monaghan
- -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 12:54 PM To: CF-Talk Subject: RE: SQL quicky Yes I am trying to format a phone number (it's kept in the database as 1234567890) for an output form. The problem is that the usual formatting

RE: SQL quicky

2001-10-04 Thread Stephen Hait
The following gives the desired output for me when TELEPHONE is defined as char(10) in the database. Are you sure you're retrieving TELEPHONE as character data and not numeric? Are you able to output TELEPHONE without any formatting? Are you able to add 1 to TELEPHONE? If yes, you have a

RE: SQL quicky

2001-10-04 Thread Janine Jakim
3:53 PM To: CF-Talk Subject: RE: SQL quicky The following gives the desired output for me when TELEPHONE is defined as char(10) in the database. Are you sure you're retrieving TELEPHONE as character data and not numeric? Are you able to output TELEPHONE without any formatting? Are you able

RE: SQL quicky

2001-10-03 Thread Mike Kear
Only accepting American phone numbers huh? Cheers, Mike Kear Windsor, NSW, Australia AFP WebWorks -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 10:21 PM To: CF-Talk Subject: OT:SQL quicky How do I format a phone number (###)

RE: SQL quicky

2001-10-03 Thread Janine Jakim
, October 03, 2001 8:29 AM To: CF-Talk Subject: RE: SQL quicky Only accepting American phone numbers huh? Cheers, Mike Kear Windsor, NSW, Australia AFP WebWorks -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 10:21 PM To: CF-Talk

RE: SQL quicky

2001-10-03 Thread Billy Cravens
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

RE: SQL quicky

2001-10-03 Thread Stephen Hait
This is not exactly within a cf sql statement, but... If you can be sure that your phone numbers are 10 digit strings you can format your output like this: cfset tel=8005551212 cfoutputtel=(#left(tel,3)#) #mid(tel,4,3)#-#right(tel,4)#/cfoutput The output would look like this: tel=(800)

RE: SQL quicky

2001-10-03 Thread Conrad Classen
Start disassembly of the phone number from the right. i.e. Last 4 digits then 3 then those left would be country/area code Conrad -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: 03 October 2001 06:53 To: CF-Talk Subject: RE: SQL quicky Well I would need to do

RE: SQL quicky

2001-10-03 Thread Leon Oosterwijk
) { strReturn = left(str, 3) - right (str, 4); } return strReturn; } -Original Message- From: Stephen Hait [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 1:14 PM To: CF-Talk Subject: RE: SQL quicky This is not exactly within a cf sql statement

RE: SQL quicky

2001-10-03 Thread Janine Jakim
) And for some reason the formatting of telephone now will not CFSET I'm not sure why, so I thought I'd try to format it within the sql statement instead. -Original Message- From: Stephen Hait [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 2:14 PM To: CF-Talk Subject: RE: SQL quicky

RE: SQL quicky

2001-10-03 Thread Stephen Hait
I'd try to format it within the sql statement instead. -Original Message- From: Stephen Hait [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 2:14 PM To: CF-Talk Subject: RE: SQL quicky This is not exactly within a cf sql statement, but... If you can be sure