Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Advanced Techniques / March 2006



Tip: Looking for answers? Try searching our database.

Putting data into a temporary table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frec - 30 Mar 2006 16:20 GMT
I have a recordset that gets numbers from a text. Is there anyway I put this data into an array and change the data type from text to number.
Sojovi - 30 Mar 2006 17:48 GMT
You can use ValueList, returns a comma-separated list of the values of each
record returned from a previously executed query.
ValueList(query.column,delimiter)
And then ListToArray(list, delimiter). About conversion.. in CF is not
necesary, but you have Val(string), that returns a number that the beginning of
a string can be converted to. Returns 0 if conversion is not possible

Regards
Sojovi - 30 Mar 2006 17:49 GMT
You can use ValueList, returns a comma-separated list of the values of each
record returned from a previously executed query.
ValueList(query.column,delimiter)
And then ListToArray(list, delimiter). About conversion.. in CF is not
necesary, but you have Val(string), that returns a number that the beginning of
a string can be converted to. Returns 0 if conversion is not possible

Regards
Dan Bracuk - 30 Mar 2006 18:33 GMT
You could also do nothing.  That field of your query is an array.
Sojovi - 30 Mar 2006 19:34 GMT
Yes, Dan is rigth. You can handle a query column as an array.

Regards
Not Nick - 31 Mar 2006 04:59 GMT
CF variables are casted that way, they are all variants. If you need to use the number in a javafunction you will need to use javacast, otherwise: If it looks like a number it IS a number :)
Dan Bracuk - 31 Mar 2006 05:03 GMT
Originally posted by: Frec
Yes, but I need a way to convert that data to a number.  So a sum function will work.

What will you be converting it from?  
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.