cfquery

cfmail group attribute throws error

只谈情不闲聊 提交于 2021-02-05 09:38:29
问题 I have a query which returns multiple results with just data in one column as different for a particular report number. I want to group the results for one report number and send an email to one person for all the action items. Below is my query <cfquery name="qryCorrectiveDueDate" datasource="#application.config.DSN#"> SELECT FR.report_id, FR.report_number, IR.investigation_id, CA.action_who, CA.action_who_email, CA.action_what, CA.action_when, CA.action_type, CA.action_complete_date FROM

cfmail group attribute throws error

痞子三分冷 提交于 2021-02-05 09:38:19
问题 I have a query which returns multiple results with just data in one column as different for a particular report number. I want to group the results for one report number and send an email to one person for all the action items. Below is my query <cfquery name="qryCorrectiveDueDate" datasource="#application.config.DSN#"> SELECT FR.report_id, FR.report_number, IR.investigation_id, CA.action_who, CA.action_who_email, CA.action_what, CA.action_when, CA.action_type, CA.action_complete_date FROM

Using CFQUERY and CFSELECT to pull multiple values based on selection

a 夏天 提交于 2020-01-17 13:49:06
问题 I have a CFQUERY pulling three columns. The following CFSELECT allows the user to make a selection from various results based on the 'display' parameter, and sets the value to the 'value' parameter. I would like to pass the third unused value of that record to a variable to be used in a later query. I cannot set the 'value' field to the column I need since that value is needed in a query following this one (queries populate based on previous drop down selections). Is there a way to do this?

ColdFusion: SQL Select IN from a Query

烂漫一生 提交于 2020-01-04 02:06:09
问题 I have a SQL Server query which returns two values for one MyBusinessUnit column returns two values, say: 1111 2222 in a query object called MyQuery1 Both of these values also exist in a DB2 database's MyCorpUnit column. What I want is to select all the matching records from the DB2 table--and, no, cross database queries are NOT working. So, here's my Query2 for DB2 database: <cfquery name="Query2" datasource="#application.DSN#"> SELECT MyCorpUnit WHERE MyCorpUnit IN ( <cfqueryparam value="

Using cachedwithin attribute inside cfquery

早过忘川 提交于 2019-12-30 18:57:13
问题 When you use the cachedwithin attribute in a cfquery how does it store the query in memory. Does it store it by only the name you assign to the query? For example, if on my index page I cache a query for an hour and name it getPeople will a query with the same name on a different page (or the same page for that matter) use the cached results or does it use some better logic to decide if it is the same query? Also, if there is a variable in your query does the cache take into account the value

Having trouble with a SQL Join in ColdFusion

一曲冷凌霜 提交于 2019-12-25 08:00:00
问题 I'm trying to do something very simple in CF/SQL but just can't seem to figure out what I am doing wrong. I have these tables: movies genres actors moviesGenres moviesActors ------ ------ ------ ------------ ------------ movieId genreId actorId id id title name fname movie movie lname genre actor I'm trying to write a query that simply lists all movies, with each movie's genre (multiple selections possible) and each movie's actors (again, multiple selections possible). When I write the query

Different results with cfstoredproc and cfquery

老子叫甜甜 提交于 2019-12-24 11:34:06
问题 When I execute a stored proc via cfstoredproc , I am getting a different result than calling that stored proc via cfquery . I am passing in the same exact parameter values to each call. And also, when I run the stored proc in SQL Studio, I get the correct results (same as the cfquery). Here's the cfstoredproc call <cfstoredproc datasource="#request.mainDSN#" debug="#request.debug#" procedure="rankingresults"> <cfprocparam type="in" value="8652" CFSQLType="CF_SQL_INTEGER"> <cfprocparam type=

Generating a total within a query loop

≡放荡痞女 提交于 2019-12-24 10:48:37
问题 I have a simple query that pulls a list of records by their ID: <cfquery name="resTotals" datasource="#datasource#"> SELECT ticket_id FROM closed_tickets WHERE YEAR(closed_date) = '2017' AND ticket_type = 'residential' </cfquery> I am then trying to loop through those ID's in another query of a different table so I can check for the existence of a payment record. The goal is to then total up all the payment records find to get a total amount in dollar of payments. I have this query to do that