0

There is a report with a few arguments - name, surname and others. For example, we have name "Jason" and surname "Statham". In this case I have to select all who are "Jason Statham". The second case: we have name "Jason" and surname empty. Now I need all "Jason" and surname doesn't matter.

When I used ms access I could do this with query like this:

SELECT name, surname, birthday
FROM dbo.guest AS g 
INNER JOIN dbo.pass AS lp ON g.account = lp.account
WHERE name = @argName AND surname = @argSurname

But in SSRS, if surname isn't defined, this query select records where name is "Jason" and surname is empty. But when I don't define surname I mean "give me all Jason with any surname". How can I do it?

tw1ggyz
  • 23
  • 5

0 Answers0