Quantcast
Channel: Robust Parameters
Viewing all articles
Browse latest Browse all 5

Robust Parameters

$
0
0

Hi Igor,

thank you, I understand but how do I get each statement to represent a value in the paramaeter list.

So when the user selects named users it will choose the first part of the untion, anonymous the second and all, it just runs all.

Is it possible to give a select statement an alias?

SELECT blah, blah

FROM MyTable

WHERE (your criteria for anonymous) AND (@parameter = 'anonymous' OR @parameter = 'all')

UNION

SELECT blah, blah

FROM MyTable

WHERE (your criteria for named user) AND (@parameter = 'named' OR @parameter = 'all')


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>