如何订购XML查询?

时间:2012-06-27 16:00:14

标签: xml stored-procedures ssms

我在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是存储过程

0 个答案:

没有答案