kenny30 发表于 2006-2-22 10:36

这个程序该怎么编写??

<P ><FONT size=3>本人新学<FONT face="Times New Roman">Oracle,</FONT>在<FONT face="Times New Roman">Reporting Service </FONT>制作报表中遇到一点问题急需解决<FONT face="Times New Roman">:<o:p></o:p></FONT></FONT></P>
<P ><FONT size=3>程序中有<FONT face="Times New Roman"> 2</FONT>个<FONT face="Times New Roman">text</FONT>框<FONT face="Times New Roman">txtA,txtB(</FONT>只能选一个进行值的输入<FONT face="Times New Roman">),</FONT>分别对应参数表中<FONT face="Times New Roman">2</FONT>个参数<FONT face="Times New Roman">:pA,pB<o:p></o:p></FONT></FONT></P>
<P ><FONT size=3>现在于<FONT face="Times New Roman">Reporting Service </FONT>数据域中进行查询操作<FONT face="Times New Roman">: <o:p></o:p></FONT></FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">SELECT * FROM TABLE <o:p></o:p></FONT></FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">WHERE <o:p></o:p></FONT></FONT></P>
<P ><FONT face="Times New Roman"><FONT size=3>TABLE.Aa = :pA AND TABLE.Bb = :pB       (1)<o:p></o:p></FONT></FONT></P>
<P ><FONT size=3>现要求<FONT face="Times New Roman">txtA,txtB</FONT>任意且只能选择一个输入数值<FONT face="Times New Roman">,(1)</FONT>式都可以执行<FONT face="Times New Roman">,  </FONT>当<FONT face="Times New Roman"> </FONT><FONT face="Times New Roman">txtA</FONT>中有值时<FONT face="Times New Roman">,</FONT>条件<FONT face="Times New Roman">TABLE.Bb = :pB  </FONT>略过执行<FONT face="Times New Roman">,</FONT>当<FONT face="Times New Roman">txtB</FONT>中有值时<FONT face="Times New Roman">,</FONT>条件<FONT face="Times New Roman">TABLE.Aa = :pA</FONT>略过执行<FONT face="Times New Roman">.(1)</FONT>式如何修改<FONT face="Times New Roman">?.</FONT>即<FONT face="Times New Roman">:pA</FONT>与<FONT face="Times New Roman">:pB</FONT>一个传入数值一个转入<FONT face="Times New Roman">""</FONT>的情况下<FONT face="Times New Roman">.<o:p></o:p></FONT></FONT></P>
<P ><FONT size=3>注<FONT face="Times New Roman">:</FONT>要求同时传入<FONT face="Times New Roman">2</FONT>个参数<FONT face="Times New Roman">,</FONT>不使用<FONT face="Times New Roman">IF</FONT>判断<FONT face="Times New Roman">.</FONT></FONT></P>

zorro2zzz 发表于 2006-2-23 01:08

晕了……[em06]

页: [1]

编程论坛