Concatenate DropDown from DB2
Hi,
I am trying to concatenate values from two columns in a DB2 table and populate a dropdown list with it:
testForm.cfm:
<html>
<head>
<title>Input form</title>
</head>
<body>
<cfquery name="getBranch" datasource="AXMISC_SURVEY">
SELECT (BRANCH_NUM CONCAT BRANCH_NAME)
INTO BRANCHINFO
FROM SURVEY.BRANCH
</cfquery>
<!--- Define the action page in the form tag.
The form variables pass to this page
when the form is submitted --->
<cfform action="testAction.cfm" method="post">
<!--- List box. --->
Branch
<!--- <cfset optsize=getBranch.recordcount + 1> --->
<cfselect name="Branch" query="getBranch" value="BRANCH_NUM" size=11 display="BRANCHINFO">
<!--- <option value="">Select All --->
</cfselect>
<!--- Reset button. --->
<cfinput type="reset" name="ResetForm" value="Clear Form">
<!--- Submit button. --->
<cfinput type="submit" name="SubmitForm" value="Submit">
</cfform>
</body>
</html>
_______________________________________________________
testAction.cfm:
<html>
<head> <title>Insert Survey Form</title> </head>
<body>
<!--- Insert the new record --->
<cfquery datasource="AXMISC_SURVEY">
INSERT INTO SURVEY.CAF_SURVEY
(SURVEY_DATE)
VALUES
(
<cfqueryparam cfsqltype="cf_sql_date" value="#form.SURVEY_DATE#">
)
</cfquery>
<!--- <cfoutput>You have added #CONTACT_NAME# to the
Client Survey database.
</cfoutput> --->
</body>
</html>
Code samples are greatly appreciated.
Thank you,
Jeanne Langfeldt
