Is it possible to do in one statement?
I have a sp where I am passing 2 param:
@lastName and @ID. Some times ID can be empty and I
need to select based on lastname, if Id is not empty select
spesific record. My 'or' and 'And' is not working correct.
Can you help me?
SELECT *
FROM Table1
WHERE NameLast LIKE @lastName or ID='@id
I have a sp where I am passing 2 param:
@lastName and @ID. Some times ID can be empty and I
need to select based on lastname, if Id is not empty select
spesific record. My 'or' and 'And' is not working correct.
Can you help me?
SELECT *
FROM Table1
WHERE NameLast LIKE @lastName or ID='@id