Hi, this my sql code:
and my data:
CustomerID parentafi
1 NULL
2 1
3 2
4 2
5 2
6 5
my problem is when i choose like this:
@Parentafi = 2
my first row is CustomerID = 2 and his Parentafi = 1, not "Null" and always i see a message error, how i can fix this problem, please thx!
SELECT Customer.CustomerID, StateAfi.Icono, Customer.FirstName, Customer.Parentafi |
FROM Customer INNER JOIN |
StateAfi ON Customer.Stateafi = StateAfi.Stateafi |
WHERE Parentafi>=@Parentafi or CustomerID=@Parentafi |
and my data:
CustomerID parentafi
1 NULL
2 1
3 2
4 2
5 2
6 5
my problem is when i choose like this:
@Parentafi = 2
my first row is CustomerID = 2 and his Parentafi = 1, not "Null" and always i see a message error, how i can fix this problem, please thx!