TSQL - I need to loop through a table and run two queries - queries may return zero or many rows
I am trying to paste together a string - a static first part
The second is a lookup into a table that may return none or many rows (one string)
The third is a lookup into another table that may return none or many rows (one string)
The forth part is a static string
static - lookup + lookup - static
but looping though a table of ids.