我有一个SQL选择语句:
SELECT Code, Description
FROM Table1
WHERE (Code='a' and Amount>100) or (Code='b' and Amount<100)
我希望使用XML来呈现SELECT语句。这是我的初步设计:
<select table="Table1">
<columns>
<column name="Code"/>
<column name="Description"/>
</columns>
<filters>
<or>
<and>
<filter field="Code" cond="eq" value="a"/>
<filter field="Amount" cond="gt" value="100"/>
</and>
<and>
<filter field="Code" cond="eq" value="b"/>
<filter field="Amount" cond="lt" value="100"/>
</and>
</or>
</filters>
</select>
但是,我不满意。找一个xsdforsqlselect语句要复杂得多。我还没有在SQL SELECT语句中包括许多特性,例如:聚合、内部/外部连接、中间、内部、子选择等。
我无法设计这样的模式。有人知道是否存在这样的XSD to for SQL Select语句表示吗?