RE: Phone Number Format

2002-05-18 Thread Mike Kear

Until you want to put in a phone number from any other country than the USA
of course.  Because it's only North America that uses the 3-3-4 format.  The
other countries in the world use a dazzling array of formats, some with area
codes, some without.  Here in Australia our phone numbers are anything from
5 to 11 digits.



Cheers,
Mike Kear
Windsor, NSW, Australia
AFP WebWorks


-Original Message-
From: Burcham, Steve [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 18, 2002 6:38 AM
To: CF-Talk
Subject: RE: Phone Number Format

Thanks Janine. I ended up going with the SQL. Worked great.


Thank you.

Steve Burcham
Webmaster - Field Support Team
RDO Equipment Co.
Phone (701) 239-8755
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]


-Original Message-
From: Janine Jakim [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 2:26 PM
To: CF-Talk
Subject: RE: Phone Number Format


in sql
 ('(' + SUBSTRING(AS.TELEPHONE, 1,3) + ') ' + SUBSTRING(AS.TELEPHONE,4,3) +
'-' + SUBSTRING(AS.TELEPHONE,7,4)) AS TELEPHONE

or as a cfset

CFSET TELEPHONE=(#left(SchoolInfo.TELEPHONE,3)#)
#mid(School.TELEPHONE,4,3)#-#mid(School.TELEPHONE,7,4)#

-Original Message-
From: Burcham, Steve [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 17, 2002 3:27 PM
To: CF-Talk
Subject: Phone Number Format


I have a column in a SQL database called COMP_PHONE, it is a char data type.
Right now the phone number is in the database as 1234567890.

I want to output this as (123) 456-7980 in my application. I have tried
using NumberFormat to no avail. I get an error message when I run the code
stating the format is invalid.

Here is the code I was using:

#NumberFormat(COMP_PHONE, '(999)999-')#

Any suggestions would be appreciated.

Thank you.

Steve Burcham
Webmaster - Field Support Team
RDO Equipment Co.
Phone (701) 239-8755
 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]





__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Random display of QUERY results

2002-05-18 Thread Brian Simpson

I'm still new to Cold Fusion and need some help.

How do you Randomly display 4 results out of a query?

I have a query that selects 88 records out of 486. I want to display 4 of 
these record at Random.

Thanks


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Random display of QUERY results

2002-05-18 Thread Jon Hall

Without modifying the query, here is one way.

cfquery name=queryName dsn=#dsn#
SELECT Col1, Col2, Col3
..
/cfquery

cfset randRecordsList = ''
cfloop from=1 to=4 index=i
cfset randVal = randRange(1,queryName.recordCount)
cfset randRecordsList = listAppend(randRecordsList , randVal)
/cfloop

cfloop list=#randRecordsList# index=i
cfoutput
  #queryName.col1[i]#
  #queryName.col2[i]#
  #queryName.col3[i]#br
/cfoutput
/cfloop

There is probably a better way, but this will work. The routine doesn't need
to know that you have 88 records coming back, since you can use the
queryName.recordcount property to get that, and wont break if a different
amount of records is returned. This example also demonstrates how to access
a query resultset as a structure of arrays.
You may want to add a little additional bit of code in the first loop to
make sure no duplicate random numbers get chosen though.

jon
- Original Message -
From: Brian Simpson [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Saturday, May 18, 2002 9:27 AM
Subject: Random display of QUERY results


 I'm still new to Cold Fusion and need some help.

 How do you Randomly display 4 results out of a query?

 I have a query that selects 88 records out of 486. I want to display 4 of
 these record at Random.

 Thanks


 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Seeking ColdFusionMX Training in Boston, MA

2002-05-18 Thread David Fafard

Hello,

I recently downloaded the ColdFusionMX preview and
like what I see!

I am seeking intermediate to advanced training on using
ColdFusionMX along with MS SQL Server.

I currently have experience developing web applications
with another scripting language.

Along with learning CF syntax, I am primarily interested
in learning some advanced ColdFusion concepts like 
User Defined Functions, COM, XML, WebServices, etc.

TIA for any suggestions,
Dave


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Error resolving parameter STTMDS.GET.HANDLERURL with CF and Spectra

2002-05-18 Thread Avery Anthony


__
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Seeking ColdFusionMX Training in Boston, MA

2002-05-18 Thread Douglas Brown

I would more than likely say that the best way to familiarize yourself with
CF concepts would be to purchase a copy of Ben Fortas Advanced Macromedia
Coldfuision book. The book is very extensive and covers all areas of
advanced CF techniques that you might try. As far as UDF's, if you are
familiar with Javascript, you will not have a problem with cfscript. Classes
are ok etc...but you can teach yourself more for less money by just going
through some of the example applications.




- Original Message -
From: David Fafard [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Saturday, May 18, 2002 3:01 PM
Subject: Seeking ColdFusionMX Training in Boston, MA


 Hello,

 I recently downloaded the ColdFusionMX preview and
 like what I see!

 I am seeking intermediate to advanced training on using
 ColdFusionMX along with MS SQL Server.

 I currently have experience developing web applications
 with another scripting language.

 Along with learning CF syntax, I am primarily interested
 in learning some advanced ColdFusion concepts like
 User Defined Functions, COM, XML, WebServices, etc.

 TIA for any suggestions,
 Dave


 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Temporary Tables

2002-05-18 Thread jgeorges

I am building records from several datasources.  I would like to save the data in a 
temporary table which I will eventually query and pass the query results to CFX_Excel 
to create an xls file.



I am using Cold Fusion 5.  My datasources are SQL Server databases.



What are my options for saving the data that I can eventually query using CFQUERY?



TIA,



Sam










Visit iWon.com - the Internet's largest guaranteed cash giveaway!
__
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Temporary Tables

2002-05-18 Thread Joshua Tipton

Eventually as in the current connection or eventually as in sometime this
week?

Temp table straight out of books online

You can create local and global temporary tables. Local temporary tables are
visible only in the current session; global temporary tables are visible to
all sessions.

Prefix local temporary table names with single number sign (#table_name),
and prefix global temporary table names with a double number sign
(##table_name).

SQL statements reference the temporary table using the value specified for
table_name in the CREATE TABLE statement:

CREATE TABLE #MyTempTable (cola INT PRIMARY KEY)
INSERT INTO #MyTempTable VALUES (1)

If a local temporary table is created in a stored procedure or application
that can be executed at the same time by several users, SQL Server has to be
able to distinguish the tables created by the different users. SQL Server
does this by internally appending a numeric suffix to each local temporary
table name. The full name of a temporary table as stored in the sysobjects
table in tempdb consists of table name specified in the CREATE TABLE
statement and the system-generated numeric suffix. To allow for the suffix,
table_name specified for a local temporary name cannot exceed 116
characters.

Temporary tables are automatically dropped when they go out of scope, unless
explicitly dropped using DROP TABLE: 

A local temporary table created in a stored procedure is dropped
automatically when the stored procedure completes. The table can be
referenced by any nested stored procedures executed by the stored procedure
that created the table. The table cannot be referenced by the process which
called the stored procedure that created the table.


All other local temporary tables are dropped automatically at the end of the
current session.


Global temporary tables are automatically dropped when the session that
created the table ends and all other tasks have stopped referencing them.
The association between a task and a table is maintained only for the life
of a single Transact-SQL statement. This means that a global temporary table
is dropped at the completion of the last Transact-SQL statement that was
actively referencing the table when the creating session ended. 
A local temporary table created within a stored procedure or trigger is
distinct from a temporary table with the same name created before the stored
procedure or trigger is called. If a query references a temporary table, and
two temporary tables with the same name exist at that time, it is not
defined which table the query is resolved against. Nested stored procedures
can also create temporary tables with the same name as a temporary table
created by the stored procedure that called it. All references to the table
name in the nested stored procedure are resolved to the table created in the
nested procedure, for example:

CREATE PROCEDURE Test2
AS
CREATE TABLE #t(x INT PRIMARY KEY)
INSERT INTO #t VALUES (2)
SELECT Test2Col = x FROM #t
GO
CREATE PROCEDURE Test1
AS
CREATE TABLE #t(x INT PRIMARY KEY)
INSERT INTO #t VALUES (1)
SELECT Test1Col = x FROM #t
EXEC Test2
GO
CREATE TABLE #t(x INT PRIMARY KEY)
INSERT INTO #t VALUES (99)
GO
EXEC Test1
GO

Here is the result set:

(1 row(s) affected)

Test1Col
--- 
1   

(1 row(s) affected)

Test2Col
--- 
2   

When you create local or global temporary tables, the CREATE TABLE syntax
supports constraint definitions with the exception of FOREIGN KEY
constraints. If a FOREIGN KEY constraint is specified in a temporary table,
the statement returns a warning message indicating that the constraint was
skipped, and the table is still created without the FOREIGN KEY constraints.
Temporary tables cannot be referenced in FOREIGN KEY constraints.

Consider using table variables instead of temporary tables. Temporary tables
are useful in cases when indexes need to be created explicitly on them, or
when the table values need to be visible across multiple stored procedures
or functions. In general, table variables contribute to more efficient query
processing. For more information, see table.


Josh

-Original Message-
From: jgeorges [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, May 18, 2002 7:13 PM
To: CF-Talk
Subject: Temporary Tables

I am building records from several datasources.  I would like to save the
data in a temporary table which I will eventually query and pass the query
results to CFX_Excel to create an xls file.



I am using Cold Fusion 5.  My datasources are SQL Server databases.



What are my options for saving the data that I can eventually query using
CFQUERY?



TIA,



Sam










Visit iWon.com - the Internet's largest guaranteed cash giveaway!

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

RE: Seeking ColdFusionMX Training in Boston, MA

2002-05-18 Thread Vernon Viehe

Hi David,

Check the Training locator at:
http://trainingreg.macromedia.com/tregexternal/index.cfm

It's gonna be a while before the CFMX training cirriculum is done (August for the 
advanced course, I think, but please don't hold me to that), so you won't find any 
listings for that just yet, but you'll know where you can find them later on when they 
are ready.

Vernon Viehe
Community Manager
Macromedia, Inc.
-
Macromedia Certified Professional
http://vvmx.blogspot.com 

-Original Message-
From: David Fafard
To: CF-Talk
Sent: 5/18/2002 3:01 PM
Subject: Seeking ColdFusionMX Training in Boston, MA

Hello,

I recently downloaded the ColdFusionMX preview and
like what I see!

I am seeking intermediate to advanced training on using
ColdFusionMX along with MS SQL Server.

I currently have experience developing web applications
with another scripting language.

Along with learning CF syntax, I am primarily interested
in learning some advanced ColdFusion concepts like 
User Defined Functions, COM, XML, WebServices, etc.

TIA for any suggestions,
Dave



__
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Seeking ColdFusionMX Training in Boston, MA

2002-05-18 Thread Mark A. Kruger - CFG

David,

For good immediate information on CFMX you should check out your local user
group. You will find your CFUG manager better informed than most folks on
CFMX due to the fact he's just been to the annual CFUG managers gala where
he (we) was inundated with CFMX information from the CF product manager and
others.  Actually, I'm sitting in a boston hotel right now after our last
event of the day (ha).  Seriously, there is no doubt you will get good
information at your local cfug - not to mention you will run into a bunch of
cfmx beta testers.  Do a search at MM from user groups - there's a page
that you can search by location.  Good luck!

Mark A. Kruger, MCSE, CFG
www.cfwebtools.com
..no more brochures!



-Original Message-
From: David Fafard [mailto:[EMAIL PROTECTED]]
Sent: Saturday, May 18, 2002 5:02 PM
To: CF-Talk
Subject: Seeking ColdFusionMX Training in Boston, MA


Hello,

I recently downloaded the ColdFusionMX preview and
like what I see!

I am seeking intermediate to advanced training on using
ColdFusionMX along with MS SQL Server.

I currently have experience developing web applications
with another scripting language.

Along with learning CF syntax, I am primarily interested
in learning some advanced ColdFusion concepts like
User Defined Functions, COM, XML, WebServices, etc.

TIA for any suggestions,
Dave



__
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: MX speed vs. 5.0 speed

2002-05-18 Thread Jann VanOver

And pre-release code may be heavy with debug checks etc.

On 5/15/02 7:30 AM, Dave Carabetta [EMAIL PROTECTED] wrote:

 I was just curious for those of you who are using CF MX now... What kind
 of difference in speed are you seeing???
 
 
 That's not a question you're going to get a valid answer to until MX goes
 gold and the final code is made available. Performance tuning is an on-going
 process at MM right now.
 
 Regards,
 Dave.
 
 
 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists