我可以在DATASET2的查询中使用从DATASET1返回的值吗?
数据集1-返回“值”
<DataSet Name="DATASET1">
<Fields>
<Field Name="COLUMN1">
<DataField>COLUMN1</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>DS1</DataSourceName>
<CommandText>SELECT column1 AS COLUMN1 FROM TABLE1
AND CODE_ID = 'CREDIT_DAYS'</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
DATASET2-还应相应返回一个值
<DataSet Name="DATASET2">
<Fields>
<Field Name="COLUMN2">
<DataField>COLUMN2</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>DS1</DataSourceName>
<CommandText>
SELECT column2
FROM NEWTABLE1 a INNER JOIN NEWTABLE2 b
ON a.company_id = b.company_id
WHERE b.company_nm =
" &
(Parameters!column1.Value) & "
</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
</DataSet>
我最初所做的就是包括这个
WHERE b.company_nm =
" &
(Parameters!column1.Value) & "
哪个(Parameters!column1.Value)应该对应于第一个数据集(DATASET1)查询的结果。
这是正确的还是其他手段?