I would create a custom function on the SQL Server to get a count of items that don't have "L" for a given PO:
Code:
CREATE FUNCTION GetCountOfNotL(@PO nvarchar(10))
RETURNS int
AS
BEGIN
DECLARE @ret int;
SELECT @ret = COUNT(*) FROM PO WHERE PO=@PO AND CONCAT(INDICATOR, '') <> 'L';
IF (@ret IS NULL) SET @ret = 0;
RETURN @ret;
END;
This function returns the number of lines where INDICATOR is not L for a given PO. If this number is 0, that means the PO has all L's, and therefore can be deleted.
I use CONCAT above to ensure I get a string value because your INDICATOR field could be Null.
Then you just run a simple DELETE query to delete all the PO items whose above return value is zero:
Code:
DELETE FROM PO WHERE dbo.GetCountOfNotL(PO) = 0