How do you replace a NULL value in the select with an empty string? It doesnt look very professional to output \"NULL\" values.
This is very unusual and based on my synt
Try this, this should also get rid of those empty lines also:
SELECT prereq FROM test WHERE prereq IS NOT NULL;