|
Posted by Edgar on 02/27/06 18:43
Hi,
I need some advise on how to automate record selection on a stored
proc. Here is my situation. I have a stored proc that I used on
Crystal reports with two parameters - Acctcode and Subacct. When a
user enters ' *' on these parameter, it means to report on all
accounts otherwise, report only on specific account.
Here is my select statement with line numbers:
Create proc rb_SubledgerRpt
@Acctcode varchar(4), @SubAcct varchar(3)
As
3 Select AcctCode, SubAcct
4 From GLDetails
5 Where SubAcct <> ' '
6 and AcctCode = @Acctcode -- for specific acctcode
7 and SubAcct = @SubAcct -- for specific subacct
8 Go
-- If a user wants to see all Acctcode, and all Subacct, how do I
disable lines 6 and 7?
Thank you in advance for your help.
Edgar
[Back to original message]
|