I haven't used transact sql, but I'd imagine it supports some form of
substring function? There may be a better option, but that would work
if the data is all valid and you concatenate the string with dashes.

Ian

----- Original Message -----
From: Tony Weeg <[EMAIL PROTECTED]>
Date: Fri, 2 Jul 2004 11:41:40 -0400
Subject: sql question
To: CF-Talk <[EMAIL PROTECTED]>

is there a function in transact sql that allows something like the cfmx
insert() function?

I have a number field, 1236547852145632, that I want to display like:

1236-5478-5214-5632

and don't want to do this...

<cfset myNum = 4103346331>

<cfloop from = 4 to = #len(myNum)# index = i step = 5>
<cfset myNum = insert('-',myNum,i)>
</cfloop>

too many times in a 10000 query recordset :)
if I can pass it off to sql server, GREAT!

thanks.

...tony

tony weeg
senior web applications architect
navtrak, inc.
www.navtrak.net
[EMAIL PROTECTED]
410.548.2337

visit www.antiwrap.com to send long url emails to your friends!

-- dont mistake my perfection as arrogance
anonymous________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to