Hello,
I have a stored procedure and a simple select statement. What im trying to do is display all results in a table but doing a lookup from a return value in the procedure as the select statement in the other query. What is happening though is that you cannot have nested CFOUTPUT. any ideas?? loops etc.. does a stored proc resultset let you loop through?
Greg
<CFSTOREDPROC PROCEDURE="sp_who"
DATASOURCE="INV_PROD3_CF"
DEBUG="Yes"
RETURNCODE="Yes">
<CFPROCRESULT NAME=RS1>
</CFSTOREDPROC>
<CFQUERY NAME="infraLookup"
DATASOURCE="INFRA_CF"
DBNAME="infra5">
Select SURNAME,FIRST_NAME,ATTRIBUTE_1 from infra5..AR_USER_ATTRIBUTES
where ATTRIBUTE_1 = "#UCASE(RS1.loginame)#"
</CFQUERY>
<CFOUTPUT QUERY=RS1>
<td>#RS1.spid#</td>
<td>#RS1.status#</td>
<td>#RS1.loginame#</td>
<td>#RS1.blk#</td>
<CFOUTPUT QUERY=infralookup>#SURNAME#</CFOUPUT>
<td>#RS1.dbname#</td>
<td>#RS1.hostname#</td>
<td>#RS1.cmd#</td>
</tr>
</CFOUTPUT>
I have a stored procedure and a simple select statement. What im trying to do is display all results in a table but doing a lookup from a return value in the procedure as the select statement in the other query. What is happening though is that you cannot have nested CFOUTPUT. any ideas?? loops etc.. does a stored proc resultset let you loop through?
Greg
<CFSTOREDPROC PROCEDURE="sp_who"
DATASOURCE="INV_PROD3_CF"
DEBUG="Yes"
RETURNCODE="Yes">
<CFPROCRESULT NAME=RS1>
</CFSTOREDPROC>
<CFQUERY NAME="infraLookup"
DATASOURCE="INFRA_CF"
DBNAME="infra5">
Select SURNAME,FIRST_NAME,ATTRIBUTE_1 from infra5..AR_USER_ATTRIBUTES
where ATTRIBUTE_1 = "#UCASE(RS1.loginame)#"
</CFQUERY>
<CFOUTPUT QUERY=RS1>
<td>#RS1.spid#</td>
<td>#RS1.status#</td>
<td>#RS1.loginame#</td>
<td>#RS1.blk#</td>
<CFOUTPUT QUERY=infralookup>#SURNAME#</CFOUPUT>
<td>#RS1.dbname#</td>
<td>#RS1.hostname#</td>
<td>#RS1.cmd#</td>
</tr>
</CFOUTPUT>