Damn your smart!!!  Why has my brain forsaken me!?

-----Original Message-----
From: DeShazo, Jonathan P. (Keane) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 16, 2003 1:19 PM
To: CF-Talk
Subject: RE: dynamic query question

Why not alias the column name?
As in:

<CFQUERY NAME="cc" DATASOURCE="#request.mainDSN#">
SELECT      #form.material# AS material, 
FROM        cc, compat
where chemicalID = #chemicalID#
</CFQUERY>

-Then refernce the output as cc.material.



-----Original Message-----
From: Emmet McGovern [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2003 12:56 PM
To: CF-Talk
Subject: RE: dynamic query question


Or better explanation.  How do I set the #form.material# so I can access
it as a query variable?

Emmet

-----Original Message-----
From: Emmet McGovern 
Sent: Wednesday, July 16, 2003 12:42 PM
To: CF-Talk
Subject: dynamic query question

I was handed a poorly designed to integrate into an app. The record set
is fairly huge.

I need to access the db using a dynamic query where the select column
statement is populated by a form.

<CFQUERY NAME="cc" DATASOURCE="#request.mainDSN#">
SELECT      #form.material#, 
FROM        cc, compat
where chemicalID = #chemicalID#
</CFQUERY>

My question is how do I reference the column name for output if I don't
know the column name on the processing page?  I know ive seen something
about this somewhere.

Emmet



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

Reply via email to