NervousRex
Programmer
I need to change up an existing query in an application, I have no CF expierence so need the details, as I have no clue on debugging or anything like that.
Existing query:
In the Where clause, I need to add a dynamic line to it that is <day_of_week> = 1
I got the DayOfWeekAsString(DayOfWeek(Now())) part I think, but I don't know CF syntax enough to add the dynamic stuff into the query string.
Appreciate any help
Existing query:
Code:
<cfquery name="qry_select_client_contact" datasource="#request.dsn#" dbtype="#request.dbtype#">
select a.contact_for as biz_association_id, a.contact_type, a.client_id, a.contact_id, a.contact, b.client_first_name + ' ' + b.client_last_name as client_name, b.client_company_name as company_name, b.client_first_name + ' ' + b.client_last_name as full_name
from v_Client_Contact_Preferences a, v_calling_clients b, v_Nightly_Calendar_Recipients c
where a.BP_Contact_Name='Calendar' AND
a.contact_for=b.biz_association_id AND
a.contact_for=c.biz_association_id AND
c.send_calendars=1 AND
b.active_status=1 AND
b.on_hold_status=0 AND
b.orientation_released=1
order by b.client_last_name, b.client_first_name, a.contact_type
</cfquery>
In the Where clause, I need to add a dynamic line to it that is <day_of_week> = 1
I got the DayOfWeekAsString(DayOfWeek(Now())) part I think, but I don't know CF syntax enough to add the dynamic stuff into the query string.
Appreciate any help