<cfset treatedFields = "">
<cfloop index="listitem" list="#form.fieldnames#">
<cfif NOT ListFind(treatedFields,listitem)>
<cfset treatedFields = ListAppend(treatedFields,listitem)>
<!--- rest of your code --->
</cfif>
</cfloop>
Pascal
-----Oorspronkelijk bericht-----
Van: Ramesh Deva [mailto:[EMAIL PROTECTED]
Verzonden: vr 10/10/2003 16:53
Aan: CF-Talk
CC:
Onderwerp: avoid duplicate columns in query..
Hi
This is my code..
<cfloop index="listitem" list="#form.fieldnames#">
</cfloop>
list1 = PATIENT_INITIALS, GENDER, RACE_ID, BIRTH_DATE, OTHER_ID1, OTHER_ID2,
STATE_ID, COUNTRY_ID, ZIP_POSTAL_CODE, PREFIX_ID, FIRST_NAME,
MIDDLE_INITIAL, LAST_NAME, SUFFIX, PATIENT_INITIALS, GENDER, ADDRESS_ID,
RACE_ID, BIRTH_DATE, REFERRED_BY_TYPE, CONTACT_FOR_ANOTHER_STUDY_IND,
REFERRED_BY, AVAILABLE, REFERRAL_TYPE_ID, AVAILABLE_DAYS, WORK_PHONE,
WORK_PHONE_EXTENSION, FAX_NUMBER, HOME_PHONE, EMAIL1, EMAIL2, OTHER_ID1,
OTHER_ID2, RESPONSIBLE_PARTY_ID, NOTES,
in this list1 also we can see those duplicate columns.. so we need to avoid
before building the update query..
so how to avoid duplicate columns in this loop..
appreciate for yr ideas...
Thanks
ramesh
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]