Try:
...where BplM.Line='LeSales' OR BpIM.Line = 'LeTrade'
If that isn't what you are after, then we need sample input and output in order to work out exactly what you are trying to achieve.
BTW: You do realize that the "Sales" and "Trade" columns of your output are fetched from the same column, so will always contain the same value?
Quote:
Though the "Sales" and "Trade" columns of output are fetched from the same column, but value is coming based on BplM.Line='LeSales' and BplM.Line='LeTarde'
Ah! So what you want is two columns, one has a value when BplM.Line is 'Sales' and the other when it is 'Trade'?
That's not complicated, but it needs a CASE:
SELECT CASE WHEN m.Line='LeSales' THEN d.total ELSE 0 END AS Sales,
CASE WHEN m.Line='LeTrade' THEN d.total ELSE 0 END AS Trade
FROM BplD d
INNER JOIN BplM m
ON d.BplMPkey = m.pkey
If you have other values in Line, then you will need the WHILE with an OR clause.
But the data design needs some work: you are duplicating information and slowing processing down. Add a third table called TransType with two columns
ID INT, IDENTITY
LINE NVARCHAR
And make the Line column a Foreign Key to that table. That way, you can't get "stupid values" in your Line column which means data gets missed.