CFQUERY question

2001-07-30 Thread Pooh Bear

hey can i do Full SQL programming inside cfquery tags?  or is it limited to 
inserts updates, and such?
~~
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



cfquery question???

2003-07-28 Thread Tony Weeg
SELECT
title,template,layout,meta_description,short_description,keywords,conten
t,image_a,image_b,image_c, 
build_date,state
FROM #request.departmentTable#
WHERE id = #url.id#

how could this query above possibly bomb
when in cfquery tag, yet not in query analyzer
when i know that url.id = 175 and that the
column type is int?

thanks

tony

tony weeg
[EMAIL PROTECTED]
www.revolutionwebdesign.com
rEvOlUtIoN wEb DeSiGn
410.334.6331 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



CFQUERY question

2001-02-08 Thread Joby Bednar

I've got a field in a database that is a list of id numbers.  When creating
a query how do I say pull all records that have an id of "whatever" in that
list?  I don't want to use CONTAINS since the id could be "1" and any number
with "1" in it could return the record like "142,3,8,76".

Any thoughts?
Joby Bednar
Director of Internet Design
iNEOgroup.com



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFQuery Question

2005-01-28 Thread Discover Antartica
Does anyone know how to delete duplicate records from a table and leave only 
one record in the table using . 
 
 




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192100
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


CFQUERY Question

2010-03-31 Thread Dave Sueltenfuss

I'm running into an odd behavior with CFQUERY (at least I think it is odd)

I have the following code (example)


   SELECT blah
 FROM blah
   WHERE blah = 1



   12345


if the query blahName returns no results, I thought i would still be able to
access blahName.recordCount

Am I wrong on this, or is there something else I am overlooking?

Thanks
-Dave


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332498
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CFQUERY Question

2009-01-07 Thread Andrew Tegenkamp
I have a SQL statement that is easier to build and save as a variable but it 
throws an error when I do this:



#strSQL2#


The error says it is trying to insert the values with two '':
SQL: INSERT INTO users(userName) VALUES(''andrew'')

If I put the SQL code into the CFQUERY tag it is fine. 

Why is this and can I fix it? 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317533
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: CFQUERY question

2001-07-30 Thread Dave Watts

> hey can i do Full SQL programming inside cfquery tags?  or is 
> it limited to inserts updates, and such?

No, on most platforms you should be able to write whatever SQL batch you
want within a CFQUERY.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~
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



RE: CFQUERY question

2001-07-31 Thread Costas Piliotis

Like what?

What exactly are you looking for?  CREATE, ALTER, AND DROP work...

-Original Message-
From: Pooh Bear [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 30, 2001 2:26 PM
To: CF-Talk
Subject: CFQUERY question


hey can i do Full SQL programming inside cfquery tags?  or is it limited to 
inserts updates, and such?
~~
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



RE: cfquery question???

2003-07-28 Thread Raymond Camden
Are you sure request.departmentTable is a valid table?


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 28, 2003 6:46 PM
> To: CF-Talk
> Subject: cfquery question???
> 
> 
>   SELECT 
> title,template,layout,meta_description,short_description,keywo
> rds,conten
> t,image_a,image_b,image_c, 
>   build_date,state
>   FROM #request.departmentTable#
>   WHERE id = #url.id#
> 
> how could this query above possibly bomb
> when in cfquery tag, yet not in query analyzer
> when i know that url.id = 175 and that the
> column type is int?
> 
> thanks
> 
> tony
> 
> tony weeg
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
> rEvOlUtIoN wEb DeSiGn
> 410.334.6331 
> 
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: cfquery question???

2003-07-28 Thread Mosh Teitelbaum
Best bet is to activate debugging and see what the actual query being
executed is.  That'll let you know for sure what each variable is equal to
at the time of query execution.  Also, are you sure that the table name is
correct?

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 8:46 PM
> To: CF-Talk
> Subject: cfquery question???
>
>
>   SELECT
> title,template,layout,meta_description,short_description,keywords,conten
> t,image_a,image_b,image_c,
>   build_date,state
>   FROM #request.departmentTable#
>   WHERE id = #url.id#
>
> how could this query above possibly bomb
> when in cfquery tag, yet not in query analyzer
> when i know that url.id = 175 and that the
> column type is int?
>
> thanks
>
> tony
>
> tony weeg
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
> rEvOlUtIoN wEb DeSiGn
> 410.334.6331
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: cfquery question???

2003-07-28 Thread Tony Weeg
below is what i can output on the page, first you see
175, that is the value of url.id, 3 is the len of the string
url.id and you can view, the site at

http://www.revolutionwebdesign.com/clients/armynavy/site/department.cfm

tony.

also in the debug text, you can see

SELECT * FROM armyNavy_departments WHERE id = 175 

as the query that it "Tried to parse" well, when that
gets dropped into query analyzer its all good, i get
the data im supps to get...i dont understand this one :( ?

tw

---

175 3 

Error Occurred While Processing Request  
Error Executing Database Query.  
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL
Server Driver]Numeric value out of range  
  
The error occurred in D:\www\clients\armyNavy\site\department.cfm: line
60
 
58 :SELECT *
59 :FROM #request.departmentTable#
60 :WHERE id = #url.id#
61 : 
62 : 


 
SQLSELECT * FROM armyNavy_departments WHERE id = 175  
DATASOURCE   armyNavySD3 
SQLSTATE   22003 
 
Browser   Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.0.3705) 
Remote Address   127.0.0.1 
Referrer
Date/Time   28-Jul-03 08:53 PM 
 
Stack Trace (click to expand)  


 

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 8:52 PM
To: CF-Talk
Subject: RE: cfquery question???


Are you sure request.departmentTable is a valid table?


===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 28, 2003 6:46 PM
> To: CF-Talk
> Subject: cfquery question???
> 
> 
>   SELECT 
> title,template,layout,meta_description,short_description,keywo
> rds,conten
> t,image_a,image_b,image_c, 
>   build_date,state
>   FROM #request.departmentTable#
>   WHERE id = #url.id#
> 
> how could this query above possibly bomb
> when in cfquery tag, yet not in query analyzer
> when i know that url.id = 175 and that the
> column type is int?
> 
> thanks
> 
> tony
> 
> tony weeg
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
> rEvOlUtIoN wEb DeSiGn
> 410.334.6331 
> 
> 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: cfquery question???

2003-07-28 Thread Barney Boisvert
does #request.departmenttable# contain special chars?  i'd recommend
escaping it with [brackets] either way, if you're on SQL Server or Access.
`backticks` will do it for MySQL, and I don't know about anything else.

---
Barney Boisvert, Senior Development Engineer
AudienceCentral
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com


> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 5:46 PM
> To: CF-Talk
> Subject: cfquery question???
>
>
>   SELECT
> title,template,layout,meta_description,short_description,keywords,conten
> t,image_a,image_b,image_c,
>   build_date,state
>   FROM #request.departmentTable#
>   WHERE id = #url.id#
>
> how could this query above possibly bomb
> when in cfquery tag, yet not in query analyzer
> when i know that url.id = 175 and that the
> column type is int?
>
> thanks
>
> tony
>
> tony weeg
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
> rEvOlUtIoN wEb DeSiGn
> 410.334.6331
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: cfquery question???

2003-07-28 Thread Dave Carabetta
> below is what i can output on the page, first you see
> 175, that is the value of url.id, 3 is the len of the string
> url.id and you can view, the site at
>
> http://www.revolutionwebdesign.com/clients/armynavy/site/department.cfm

In the error message, it seems to have a problem with the 175. What's the
datatype on that id column? Also, have you tried using cfqueryparam to see
if MX will cast that value to the appropriate type?

Just a couple thoughts.

Regards,
Dave.
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: cfquery question???

2003-07-28 Thread Tony Weeg
that parses out to armyNavy_departments all day long.



-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 8:57 PM
To: CF-Talk
Subject: RE: cfquery question???


does #request.departmenttable# contain special chars?  i'd recommend
escaping it with [brackets] either way, if you're on SQL Server or
Access.
`backticks` will do it for MySQL, and I don't know about anything else.

---
Barney Boisvert, Senior Development Engineer
AudienceCentral
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com


> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 5:46 PM
> To: CF-Talk
> Subject: cfquery question???
>
>
>   SELECT
>
title,template,layout,meta_description,short_description,keywords,conten
> t,image_a,image_b,image_c,
>   build_date,state
>   FROM #request.departmentTable#
>   WHERE id = #url.id#
>
> how could this query above possibly bomb
> when in cfquery tag, yet not in query analyzer
> when i know that url.id = 175 and that the
> column type is int?
>
> thanks
>
> tony
>
> tony weeg
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
> rEvOlUtIoN wEb DeSiGn
> 410.334.6331
>
> 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: cfquery question???

2003-07-28 Thread Tony Weeg
see reply to ray.  of course i checked all that, this is on my dev
box @ home... :) i can see all that !!!

see my reply!

tw

-Original Message-
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 8:54 PM
To: CF-Talk
Subject: RE: cfquery question???


Best bet is to activate debugging and see what the actual query being
executed is.  That'll let you know for sure what each variable is equal
to
at the time of query execution.  Also, are you sure that the table name
is
correct?

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Tony Weeg [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 28, 2003 8:46 PM
> To: CF-Talk
> Subject: cfquery question???
>
>
>   SELECT
>
title,template,layout,meta_description,short_description,keywords,conten
> t,image_a,image_b,image_c,
>   build_date,state
>   FROM #request.departmentTable#
>   WHERE id = #url.id#
>
> how could this query above possibly bomb
> when in cfquery tag, yet not in query analyzer
> when i know that url.id = 175 and that the
> column type is int?
>
> thanks
>
> tony
>
> tony weeg
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
> rEvOlUtIoN wEb DeSiGn
> 410.334.6331
>
> 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: cfquery question???

2003-07-28 Thread Tony Weeg
thats how the original code was...this is from site director3
and its not my code, i have to get in and hack it so that the
client can finally have their site up, i cant wait to ftp it to
experthost.com to see what issues i have, but that doesnt happen
until i get it complete, here on my devbox @ home.

anyway, here is how the code originally read, and the mssql200 data
type is most certainly int(4), im fairly good with this thing we
call cf, however, this one has me a bit perplexed???  does
anyway else use sitedirector 3, tell me what they have experienced
this really is starting to get frustrating

thanks!

tony

-Original Message-
From: Dave Carabetta [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 9:03 PM
To: CF-Talk
Subject: Re: cfquery question???


> below is what i can output on the page, first you see
> 175, that is the value of url.id, 3 is the len of the string
> url.id and you can view, the site at
>
>
http://www.revolutionwebdesign.com/clients/armynavy/site/department.cfm

In the error message, it seems to have a problem with the 175. What's
the
datatype on that id column? Also, have you tried using cfqueryparam to
see
if MX will cast that value to the appropriate type?

Just a couple thoughts.

Regards,
Dave.

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: cfquery question???

2003-07-28 Thread Tony Weeg
ok, change the datasource in the admin to microsoft sql server
and not odbc datasocket, and WHATTA YA KNOW it works perfectly

is that a bug?  this is redsky...should i notify the beta boys

or should i have not mentioned anything about it here?

tony

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 9:10 PM
To: CF-Talk
Subject: RE: cfquery question???


thats how the original code was...this is from site director3
and its not my code, i have to get in and hack it so that the
client can finally have their site up, i cant wait to ftp it to
experthost.com to see what issues i have, but that doesnt happen
until i get it complete, here on my devbox @ home.

anyway, here is how the code originally read, and the mssql200 data
type is most certainly int(4), im fairly good with this thing we
call cf, however, this one has me a bit perplexed???  does
anyway else use sitedirector 3, tell me what they have experienced
this really is starting to get frustrating

thanks!

tony

-Original Message-
From: Dave Carabetta [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 28, 2003 9:03 PM
To: CF-Talk
Subject: Re: cfquery question???


> below is what i can output on the page, first you see
> 175, that is the value of url.id, 3 is the len of the string
> url.id and you can view, the site at
>
>
http://www.revolutionwebdesign.com/clients/armynavy/site/department.cfm

In the error message, it seems to have a problem with the 175. What's
the
datatype on that id column? Also, have you tried using cfqueryparam to
see
if MX will cast that value to the appropriate type?

Just a couple thoughts.

Regards,
Dave.


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: CFQUERY question

2001-02-08 Thread bflynn

Try the CF functions ListContains or ListFind.  We dealt with the very same
issue and used one of these two to solve it, but I don't remember which.
This works as long as your database field is exactly a CF list format.

Brian

-Original Message-
From: Joby Bednar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 3:13 PM
To: CF-Talk
Subject: CFQUERY question


I've got a field in a database that is a list of id numbers.  When creating
a query how do I say pull all records that have an id of "whatever" in that
list?  I don't want to use CONTAINS since the id could be "1" and any number
with "1" in it could return the record like "142,3,8,76".

Any thoughts?
Joby Bednar
Director of Internet Design
iNEOgroup.com
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFQUERY question

2001-02-08 Thread Todd Stanley


select
whateveryouwanttoselect
from
tablename
where
idnumber = #whatever#



-Original Message-
From: Joby Bednar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 3:13 PM
To: CF-Talk
Subject: CFQUERY question


I've got a field in a database that is a list of id numbers.  When creating
a query how do I say pull all records that have an id of "whatever" in that
list?  I don't want to use CONTAINS since the id could be "1" and any number
with "1" in it could return the record like "142,3,8,76".

Any thoughts?
Joby Bednar
Director of Internet Design
iNEOgroup.com
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFQuery Question

2005-01-28 Thread Adam Haskell
Select Distinct *
INTO #temp
>From mytable

truncate TABLE my table

Insert into myTable
Select *
>From #temp

or thats the psuedo code for it...not sure the exact syntax is right


Adam H


On Fri, 28 Jan 2005 08:14:14 -0800 (PST), Discover Antartica
<[EMAIL PROTECTED]> wrote:
> Does anyone know how to delete duplicate records from a table and leave only 
> one record in the table using .
> 
> 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192101
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFQUERY Question

2010-03-31 Thread Rick Faircloth

Your cfif statement asks for the recordCount to be returned
on if the recordCount is greater than 0.

Try cfif blahName.recordcount GTE 0 and you should
get the recordCount either way.

Rick

-Original Message-
From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] 
Sent: Wednesday, March 31, 2010 1:59 PM
To: cf-talk
Subject: CFQUERY Question


I'm running into an odd behavior with CFQUERY (at least I think it is odd)

I have the following code (example)


   SELECT blah
 FROM blah
   WHERE blah = 1



   12345


if the query blahName returns no results, I thought i would still be able to
access blahName.recordCount

Am I wrong on this, or is there something else I am overlooking?

Thanks
-Dave




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332499
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFQUERY Question

2010-03-31 Thread Steve Milburn

You are correct, the record count for an empty query object does exist (and
should be 0).  What exactly is not working?  Are you getting an error
message?



On Wed, Mar 31, 2010 at 1:59 PM, Dave Sueltenfuss wrote:

>
> I'm running into an odd behavior with CFQUERY (at least I think it is odd)
>
> I have the following code (example)
>
> 
>   SELECT blah
> FROM blah
>   WHERE blah = 1
> 
>
> 
>   12345
> 
>
> if the query blahName returns no results, I thought i would still be able
> to
> access blahName.recordCount
>
> Am I wrong on this, or is there something else I am overlooking?
>
> Thanks
> -Dave
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332500
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFQUERY Question

2010-03-31 Thread Robert Harrison

You are correct that it should work, but they maybe something else in the
code which is preventing the query from being executed. On the top of your
page add:


 
And that will deal with the case where the query is not executed.

Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged


-Original Message-
From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] 
Sent: Wednesday, March 31, 2010 1:59 PM
To: cf-talk
Subject: CFQUERY Question


I'm running into an odd behavior with CFQUERY (at least I think it is odd)

I have the following code (example)


   SELECT blah
 FROM blah
   WHERE blah = 1



   12345


if the query blahName returns no results, I thought i would still be able to
access blahName.recordCount

Am I wrong on this, or is there something else I am overlooking?

Thanks
-Dave




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332501
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFQUERY Question

2010-03-31 Thread Dave Sueltenfuss

Ok, found the cause of the issue, by taking the query into SQL Server

In SQL,  the following is being returned

*Warning: Null value is eliminated by an aggregate or other SET operation.

(0 row(s) affected)*

So it appears this is what is throwing off the query results in CF

I am working on resolving this issue now.

-Dave

On Wed, Mar 31, 2010 at 2:18 PM, Robert Harrison  wrote:

>
> You are correct that it should work, but they maybe something else in the
> code which is preventing the query from being executed. On the top of your
> page add:
>
>
>
> And that will deal with the case where the query is not executed.
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
> -Original Message-
> From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com]
> Sent: Wednesday, March 31, 2010 1:59 PM
> To: cf-talk
> Subject: CFQUERY Question
>
>
> I'm running into an odd behavior with CFQUERY (at least I think it is odd)
>
> I have the following code (example)
>
> 
>   SELECT blah
> FROM blah
>   WHERE blah = 1
> 
>
> 
>   12345
> 
>
> if the query blahName returns no results, I thought i would still be able
> to
> access blahName.recordCount
>
> Am I wrong on this, or is there something else I am overlooking?
>
> Thanks
> -Dave
>
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332502
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFQUERY Question

2010-03-31 Thread Maureen

If the query is executing correctly but bringing back no records, this
should work with blahname.recordcount  equal zero .  If the query is
not executing correctly,  blahname.recordcount will not equal zero.

On Wed, Mar 31, 2010 at 10:59 AM, Dave Sueltenfuss
 wrote:
>
> I'm running into an odd behavior with CFQUERY (at least I think it is odd)
>
> I have the following code (example)
>
> 
>   SELECT blah
>     FROM blah
>   WHERE blah = 1
> 
>
> 
>   12345
> 
>
> if the query blahName returns no results, I thought i would still be able to
> access blahName.recordCount
>
> Am I wrong on this, or is there something else I am overlooking?
>
> Thanks
> -Dave
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332503
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFQUERY Question

2009-01-07 Thread Ian Skinner
Andrew Tegenkamp wrote:
> Why is this 

Because CF automatically escapes all single quotes in variables used 
inside of a  block.

> and can I fix it? 

Use the perserveSingleQuotes() function whose purpose is to over ride 
this default behavior.

Just be aware that if you are not careful, it is really easy to open 
yourself up to all kinds of potential for SQL injection attacks with 
this kind of functionality.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317534
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFQUERY Question

2009-01-08 Thread Tom Chiverton
On Wednesday 07 Jan 2009, Andrew Tegenkamp wrote:
> can I fix it?

You can, but shouldn't. Constructing raw SQL strings is dangerous, security 
wise.
I expect your real use case is more complex, but rewriting it to :

INSERT INTO users(userName) VALUES()

is trivial.

-- 
Tom Chiverton
Helping to synergistically negotiate fourth-generation next-generation metrics



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at 
Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB.  A list 
of members is available for inspection at the registered office together with a 
list of those non members who are referred to as partners.  We use the word 
?partner? to refer to a member of the LLP, or an employee or consultant with 
equivalent standing and qualifications. Regulated by the Solicitors Regulation 
Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317604
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cfoutput and cfquery question ...

2004-08-28 Thread Charles Heizer
Hello,
I was wondering if there was a easy way to run a quick query and have it display all of the results with out know in column names?

Example --


	SELECT *
	FROM DOCS



   #q_Info.queryoutput# <--- This is what I need help with :-)


Thanks,
- Charles
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




CFquery question on simultaneous lookup

2003-11-20 Thread Ketan Patel
hi all,
I have a situation where I have to read the data from the table while the
other script is inserting data at the same time. Means I have a cgi script
which inserts data and cfm page is calling that inserted data till it finds
end word in one of the field. How I can do that using cfflush. I have to
search the data and display it at the same time look for the new records
added to the table till I get END form one of the field. I tried cfquery and
loop but problem is cfquery will only return 1 record how can I tell it to
start again till I get END and do not look for already searched results. Has
anybody done like this, if so any help is appreciated.

Ketan

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: cfoutput and cfquery question ...

2004-08-28 Thread Dick Applebaum
Loop thru query.ColumnNames

On Aug 28, 2004, at 12:06 PM, Charles Heizer wrote:

> Hello,
>  I was wondering if there was a easy way to run a quick query and have 
> it display all of the results with out know in column names?
>
>  Example --
>
>  
>  SELECT *
>  FROM DOCS
>  
>
>  
> #q_Info.queryoutput# <--- This is what I need help with :-)
>  
>
>  Thanks,
>  - Charles
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: cfoutput and cfquery question ...

2004-08-28 Thread Marlon Moyer
you could always use 

or you could loop through the q_info.columnlist variable.

> -Original Message-
> From: Charles Heizer [mailto:[EMAIL PROTECTED]
> Sent: Saturday, August 28, 2004 2:07 PM
> To: CF-Talk
> Subject: cfoutput and cfquery question ...
> 
> Hello,
> I was wondering if there was a easy way to run a quick query and have it
> display all of the results with out know in column names?
> 
> Example --
> 
> 
> 	SELECT *
> 	FROM DOCS
> 
> 
> 
>    #q_Info.queryoutput# <--- This is what I need help with :-)
> 
> 
> Thanks,
> - Charles
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: cfoutput and cfquery question ...

2004-08-28 Thread joe velez
Here you go ...



  
  #col# = #evaluate(col)#
  


- Joe
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: cfoutput and cfquery question ...

2004-08-28 Thread Charles Heizer
This was just what I was looking for ...

Thanks a bunch!

- Charles

>Here you go ...
>
>
>
>  
>  #col# = #evaluate(col)#
>  
>
>
>- Joe
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




CFQUERY Question to populate a drop down for search

2002-05-29 Thread Brian Simpson

CFQUERY Question to populate a drop down for search

I'm looking for a way to query a database table and display the results 
with out any diplicates.

The  "WHERE city is unique" does not work.




SELECT city
FROM profiles
WHERE city is unique



#getcity.city#



__
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: CFQUERY Question to populate a drop down for search

2002-05-29 Thread A . Little

You could use:

SELECT DISTINCT city FROM profiles


Alex

> -Original Message-
> From: Brian Simpson [mailto:[EMAIL PROTECTED]]
> Sent: 29 May 2002 10:32
> To: CF-Talk
> Subject: CFQUERY Question to populate a drop down for search
> 
> 
> CFQUERY Question to populate a drop down for search
> 
> I'm looking for a way to query a database table and display 
> the results 
> with out any diplicates.
> 
> The  "WHERE city is unique" does not work.
> 
> 
> 
> 
> SELECT city
> FROM profiles
> WHERE city is unique
> 
> 
> 
> #getcity.city#
> 
> 
> 
> 
__
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



RE: CFQUERY Question to populate a drop down for search

2002-05-29 Thread Philip Arnold - ASP

> You could use:
>
> SELECT DISTINCT city FROM profiles

Not forgetting to ORDER BY the query, otherwise it can appear
pseudo-random

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


__
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



RE: CFQUERY Question to populate a drop down for search

2002-05-29 Thread Rob Baxter

If you want the results sorted on the DISTINCT column(s) there's no need to
include an order by. The SQL engine must sort the results on those fields to
determine uniqueness. It's probably a good practice to include an order by
anyway, just for clarity.



-Original Message-
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 5:57 AM
To: CF-Talk
Subject: RE: CFQUERY Question to populate a drop down for search


> You could use:
>
> SELECT DISTINCT city FROM profiles

Not forgetting to ORDER BY the query, otherwise it can appear
pseudo-random

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**



__
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