Sorry, I don't understand what you're trying to accomplish here. 
Are you trying to output a value obtained from a query to a web 
page or add formatted data to a database table or something 
else?

> That's what I had originally. It works fine for my forms that pull
> up individual records. However, upon doing the bulk records I needed
> to change how my queries sat. All the related queries are a <CFLOOP
> QUERY> within a query.( <CFQUERY MAIN><CFLOOP QUERY1><CFLOOP
> QUERY2><CFLOOP QUERY3> </CFQUERY>) 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
> 
> 
> 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">
> 
> <cfoutput>tel=(#left(tel,3)#)
> #mid(tel,4,3)#-#right(tel,4)#</cfoutput>
> 
> The output would look like this:
> tel=(800) 555-1212 
> 
> > 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