Adobe Community
All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forÂ
ShowÂ
 onlyÂ
|
Search instead forÂ
Did you mean:Â
Global community
Language:
Deutsch
English
Español
Français
Português
日本語コミュニティ
Dedicated community for Japanese speakers
í•œêµ ì»¤ë®¤ë‹ˆí‹°
Dedicated community for Korean speakers
Sign In
Exit
Home
ColdFusion
Discussions
SQL Encapsulation In variable
Home
ColdFusion
Discussions
SQL Encapsulation In variable
0
Upvote
SQL Encapsulation In variable
Guest
/t5/coldfusion-discussions/sql-encapsulation-in-variable/td-p/1064035
Jul 01, 2006
Jul 01, 2006
Copy link to clipboard
Copied
I think i am missing some thing . when i am doing some thing like this its working
<cfset QueryA = "Select * from Test">
<cfquery name="ABC" datasource="ABC">
#QueryA#
</cfquery>
But how to Add where in IT . ??
<cfset QueryA = "Select * from Test where country = 'US' ">
<cfquery name="ABC" datasource="ABC">
#QueryA#
</cfquery>
i am just trying to make a Dynamic Query . any other ideas are welcomed
TOPICS
Advanced techniques
Views
340
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
2 Replies
2
Jump to latest reply
Dan_Bracuk
LEGEND
,
/t5/coldfusion-discussions/sql-encapsulation-in-variable/m-p/1064036#M95737
Jul 02, 2006
Jul 02, 2006
Copy link to clipboard
Copied
First, of all, you have to use the preservesinglequotes function to get querya to run as written.
My other idea is to only make part of the sql dynamic. Something like:
select somefields
from test
where country in (#ListQualify(yourvariable, "'")#)
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guest
AUTHOR
/t5/coldfusion-discussions/sql-encapsulation-in-variable/m-p/1064037#M95738
Jul 02, 2006
Jul 02, 2006
Copy link to clipboard
Copied
LATEST
In Response To Dan_Bracuk
Dan thanks for the reply . but i am trying to get Input from IM . through Eventgateway and arguments.CFEvent.DATA.Message is comming as a String .
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Post Reply
Preview
Exit Preview
never-displayed
You must be signed in to add attachments
never-displayed
Â
Resources
Documentation
ColdFusion User Guide