0

我在 SSMS 2008 R2 中有一个基于存储过程的 XML 查询。我刚刚了解了这种在 SSMS 中运行 XML 代码的酷方法,如下所示。没想到这么简单!但是,是否有一种简单的方法可以修改此 XML 查询,以便它根据我选择的任何列重新排序结果?我尝试用不同的列替换第 12 行,但这并没有改变顺序。

rpt_vacancy '<parameter_set>
<parameter name="AGENCYID" type_code="FK" value="{B233233B-6CB1-4C45-99E8-B99CB4FF8C74}" scrnval_id="" show="false">
</parameter>
<parameter name="AGENCYNAME" type_code="FK" value="Youth Villages" scrnval_id="" show="false">
</parameter>
<parameter name="ISMULTIAGENCY" type_code="L" value="0" scrnval_id="" show="false">
</parameter>
<parameter name="WORKERID" type_code="FK" value="A10EF9F9-DCF6-4B84-87F3-9988C66F2423" scrnval_id="" show="false">
</parameter>
<parameter name="REPORT_CODE" type_code="FK" value="VACANCY" scrnval_id="" show="false">
</parameter>
<parameter scrnval_id="" name="SUB_TITLE" type_code="S" show="false" value="Order by: Managing Office"/>
<parameter scrnval_id="" name="agency" type_code="FK" value="{B233233B-6CB1-4C45-99E8-B99CB4FF8C74}" descript="Youth Villages" show="true"/>
<parameter scrnval_id="" name="min_age" descript="Min Age ( Greater than or Equal to )" type_code="N" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="max_age" descript="Max Age ( Less than or Equal to )" type_code="N" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="is_suppr_units" descript="Suppress Units Totals" type_code="L" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="is_suppr_members" descript="Suppress Printing of Members" type_code="L" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="is_suppr_clients" descript="Suppress Printing of Clients Placed" type_code="L" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="is_beds_avail" descript="Homes with Available Beds" type_code="L" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="is_male_accept" descript="Accepts Male - Entry on Unit" type_code="L" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="is_female_accept" descript="Accepts Female - Entry on Unit" type_code="L" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter scrnval_id="" name="is_accept" descript="Currently Accepting Placements" type_code="L" report_parameter="1" is_not_in="" value="" show="false"/>
<parameter type_code="FK" show="true" name="Managing Office" scrnval_id="89457190-16A6-428C-9A77-682886169FEF" is_not_in="" value="4053DB39-0777-4BA2-B3D3-5A4170E343C4" descript="Jackson, MS">
</parameter>
<parameter type_code="FK" show="true" name="" scrnval_id="" is_not_in="" value="" descript="">
</parameter>
</parameter_set>
'

请注意,rpt_Vacancy 是一个存储过程

4

0 回答 0