Copy link to clipboard
Copied
I'm trying to do an insert by a select statement where the insert for one of the fields needs to be a combination of a vaule retrieved from the select and concatenated with a string of text. Is this possible and if so what would the correct syntax be? Here is an example of what I'm trying but is not working.
<cfquery name="createnote" datasource="#application.datasource#">
INSERT INTO gtbl_notes(notedate, strCustomerID, notetype, note, notecreatedby)
SELECT "#currentdate#", strCustomerID, "misc", "#gtbl_people.email# REMOVED DUE TO HARD BOUNCE", "Bounce Routine"
FROM gtbl_people, gtbl_bounces
WHERE gtbl_bounces.email = gtbl_people.email AND gtbl_bounces.subscriber = 1 AND gtbl_bounces.status = 2
</cfquery>
Any input would be greatly appreciated.
Concatonation is possible with most if not all databases. The syntax is software specific and you didn't specify yours.
Copy link to clipboard
Copied
Concatonation is possible with most if not all databases. The syntax is software specific and you didn't specify yours.
Copy link to clipboard
Copied
After posting this message I found what I was looking for. The concat function solved my issue:
concat(gtbl_people.email, " removed due to hard bounce")