Performance is a good case for denormalization. Though, typically you are better off storing the years in rows rather than columns ie yrXXXX. It is easier to optimize, and you do not have to alter the table structure every time the year changes. Just insert a new row, and you can have as many or...
Yeah, I saw your mention that it was a simplified version, but ... the fact that you are using LIKE suggested the select queries might return multiple rows. If they only ever return a single row, then it is not an issue. However, if they return more than one row, your UPDATE's would be wrong...
Nothing to do with your error, but is the your real UPDATE? Because there could be problems if the SELECT queries ie get_2008, get_2009, .. return multiple records.
Note, you might need to use SELECT DISTINCT to suppress duplicates.
Depending on your tables, another possibility is using an EXISTS clause. I do not know your table structure, but say you have:
Client / Columns: ClientID, ClientName, .... (Unique clients)
NewsLetter / Columns...
Then all you need is an IN clause. No loop. Just pass in the list of newsletter id's
<cfquery name="getclients" datasource="#db#">
SELECT clientemail
FROM VIEW_SendNotification
WHERE newsletterid IN (
<cfqueryparam value="#uniqueListOfNewsLetterIDs#" cfsqltype="cf_sql_integer"...
Which one do you want: any of all? If you mean you only want clients that subscribed to all eight (8) newsletters, use a HAVING clause instead of looping.
SELECT clientemail, COUNT(*) AS TotalNewsLetters
FROM VIEW_SendNotification
WHERE newsletterid IN (...
No, it opens fine with a real docx file (with the ":" corrected to ";").
Are your downloads true MS Word documents, or psuedo-MS Word documents ie html?
----------------------------------
http://cfsearching.blogspot.com/
Yeah, evaluate() converts those strings to numbers, ie +9 and -9, rather than dates. Cute, huh?
----------------------------------
http://cfsearching.blogspot.com/
Not sure if it is a typo, but it looks like you are missing the file extension .docx . Also, the value separator is a semi-colon, rather than a colon. ie
<cfheader name="Content-Disposition" value="attachment; filename=myfile.docx"> OR
<cfheader name="Content-Disposition"...
From what I can tell, the strings are being converted to dates. Both are interpreted as September 18 2013, which is why the comparison resolves to true. If you want to ensure a string comparison, use compare() or compareNoCase() instead.
----------------------------------...
Not quite sure I understand the problem either. However, why not just use a CASE to establish the header/subheader groups, like I mentioned in your other thread? Then sort by those values and use a nested cfoutput group.
Assuming "comm_cd" is the subheader value:
<cfquery name="yourQuery"...
It is not clear why you need to use list functions.
Typically if you wanted to group several values under one heading, you would use a CASE statement within your original database query. ie
SELECT vendor
, loc_code
, CASE
WHEN loc_code IN ('LO','AU','S')...
There is rarely a reason to need evaluate(). When you declare a variable without a scope, it is placed in the VARIABLES scope. Most CF scopes are structures. You can access the keys dynamically with associative array notation ie structName["keyName"]. Instead of evaluate(), just use the...
The closest equivalent would be listFind/listFindNoCase:
<!--- note, no pound signs ie # needed --->
<cfif listFindNoCase("LO,AU,SL", variables.location)>
----------------------------------
http://cfsearching.blogspot.com/
One way is to use cfoutput's "group" feature. First order your query results by the "group X" column:
SELECT Col FROM Table ORDER BY TheGroup1ColumnName, ...
Then add the "group" attribute to your output:
<cfoutput query="yourQuery" group="TheGroup1ColumnName">
#TheGroup1ColumnName# <br...
Typically, a rich text editor's value is accessed differently. I do not know what version you are using, but this might help: http://cksource.com/forums/viewtopic.php?f=6&t=10135&p=26722
----------------------------------
http://cfsearching.blogspot.com/
Well a couple thoughts
1) The free versions of MS tools often lack some of the more advanced tools. So it is possible that you do not have DTS installed?
http://msdn.microsoft.com/en-us/library/bb500440.aspx
2) I am not extremely familiar with DTS, but I believe is deprecated anyway. So you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.