|
Posted by helmut woess on 09/06/05 09:47
Am 5 Sep 2005 14:01:33 -0700 schrieb saturnius@gmx.net:
> Hello,
> I am passing a value to a stored procedure in vb.net to get normally a
> selection of the table. How could I get the complete table without
> writing the code twice? Many thanks in advance ....
You need a second parameter to enable/disable the where criteria. Your
select would look like so:
select * from table where column = @param1 or @param2 = 1
if you use @param2 = 0 then the column is the criteria, if you use @param2
= 1 then you will always get all rows, no matter what's in param1.
bye,
Helmut
Navigation:
[Reply to this message]
|