Hello,

i am a newbie in stored procedure programming and i am interested performing a task with a stored procedure which is either impossible or so simple that i cannot find information about it anywhere.
(Thats the reason why i post this)

My aim:

I would like to execute a select statement in a stored procedure
and filter the result set (inside the stored procedure) before i give it back
to the client application (VB client executing the stored procedure)

Background:

In our databases we have a region field (varchar(2)) which conatins the region code (e.g. 'DE', 'US', ...) and as special value there may be a '*'
which means 'all regions'

Buisness rule says: If there is an entry with a concrete region take this one otherwise take the '*'

Plan:

Stored procedure performs the select , orders by region so that * is behind
other region codes
if special region entry is found delete * entry from the result set

Is this possible ?

Happy about any hint

Michael