i got a little question, i just can't understand, what is the problem and how do i solve it, i have a coldfusion variable, for example #account_code#, first of all, this code looks like this: 100.001.001 (there are bunch of them of cource) and i have some values for this variable, like sum(nettotal) and the cfquery i grouped by this #account_code#, all i want is to set the list of these codes, thus i define list, for example <cfset code_list='100.001.001,100.001.002'> and in query: account_code in (#code_list#) i also tried this one account_code in ('#code_list#') but instead it gives out the error, it says the Incorrect syntax near '.001'. as far as i understand i need to replace somehow these dots, and define the codes id's without them. thank you all for the help! i really appretiate it!
define a list of id's for grouped item
191 Views Asked by Bato Dor At
1
There are 1 best solutions below
Related Questions in COLDFUSION
- Is there a way to get a dynamically generated QR to print on a badge card?
- "Apache2 Syntax Error: Cannot load mod_jrun22.so - undefined symbol: ap_log_error"
- Getting Java Error - java.lang.reflect.InaccessibleObjectException: Unable to make public sun.util.calendar.ZoneInfo(java.lang.String,int) accessible
- Unreadable text - dialog with goofy robot icon in VS Code
- Cold Fusion Custom Tags How To Block generatedContent if executionMode eq start
- Coldfusion SOAP API, name of parameters on wsdl changes to generic one
- passing multiple values with comma seperation in cfqueryparam causing issue. it is paasing as index scan instead of index seek
- ColdFusion app " Error Executing Database Query. Access denied for user" for RDS mySQL
- Why is CFTHREAD resuing local variable values in a loop?
- jquery validation code working but ending up uploaading same files in both different folders
- Encountering 'Error invoking CFC for gateway file: null
- cfspreadhseet - how to delete/update a comment in the cell?
- ColdFusion - page with CFCHART inserts JS into HTML <head> - Test and Prod servers it is at top of <head> my local is at bottom and causes JS conflict
- How do I decrypt an encrypted private key in ColdFusion?
- Does Coldfusion 2021 support connections to MySQL 8.0? (AWS RDS MySQL Community Server)
Related Questions in CFQUERY
- passing multiple values with comma seperation in cfqueryparam causing issue. it is paasing as index scan instead of index seek
- Search result that has a C and a number after the C in the Part Number Field in ColdFusion
- Coldfusion CFML Howto share DB Results between subpages
- How to use a variable in a cfquery?
- Coldfusion output string not defined
- Cannot find syntax error in Coldfusion query
- How to store values from a Javascript array in SQL Table
- Which is faster: CFM page full of CFQUERY calls or CFINVOKE calls?
- how to print/display cfquery with cfqueryparam values replaced?
- <cfoutput> a MySQL SUM function
- Using ColdFusion query, find number of SQL occurrences of a varchar 'headline' but show only one instance of that headline
- How to execute multiple cfquery one after another in coldfusion 8?
- How to use the js variable in Cfquery
- cfqueryparam pass in list from input checkbox
- ColdFusion - Is there a way to pull query details from prod database in dev environment?
Related Questions in CFOUTPUT
- ColdFusion: how to access dynamic column names
- Coldfusion output string not defined
- Why is cfoutput being ignored?
- Bootstrap Modal INSIDE Coldfusion <cfoutput query> tags fails with "Invalid CFML construct"
- <cfoutput> With Many-To-Many Relationship
- Need help listing products in reverse order in old ColdFusion site
- cfoutput in cfset tag
- ColdFusion cffeed/cfoutput
- count total records for each user
- How can I cfoutput a JavaScript String?
- Conditional CF Record Count
- ColdFusion cfdump / cfoutput doesn't match query analyser results
- Why can I reference RecordCount on a query embedded in an object but I can't loop over it?
- Coldfusion set dynamic columns for query output
- cfml variable inside cfoutput text
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If i understand your question is really how do you correctly use the SQL IN clause.
The SQL IN clause takes a list of values, if those values are numeric they do not need to be quoted, but your codes are strings, so each value needs to be quoted
In ColdFusion the correct way to do this is the use <cfqueryparam> with list=true
This turns your list into multiple parameters in your query, and if your code_list is actually being passed in by a form or url variable helps to protect you from SQL injection attacks.