macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

which function does this?.

Subject: which function does this?.
From: "Adomacro"
Date: Tue, 7 Aug 2007 17:39:21 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
I have to do something like this......

 How will i pass values to second query like this...

 where empid in (1001,1002,1003,1005)


 Which function does this....?.  Please help me.

 lost track of features of functions......done this 100 times before....now not 
working.


 Please help me ASAP. Thanks in advance.



 <cfquery name="id_sel" datasource="#edsn#">
        select empid
        from employee
        where age < 50
 </cfquery>

 <cfquery name="course_sel_q" datasource="#edsn#">
        select benefit_desc
        from benefits
        where empid in (<cfloop query="id_sel" startrow="1" 
endrow="#id_sel.recordcount#">
        #valueList(id_sel.empid,",")#</cfloop>)
        order by empid
 </cfquery>


<Prev in Thread] Current Thread [Next in Thread>