Apologies, I've done this in the past but am having a brain freeze.
SELECT CASE WHEN CONVERT (VARCHAR (6), GETDATE(), 112) = '201702' THEN
'FIN_CC1500-12-106-100-100', '201601', '10.24',
'FIN_FC1030-12-106-100-100', '201601', '35.66',
WHEN CONVERT (VARCHAR (6), GETDATE(), 112) = '201703' THEN
'FIN_FC1120-12-106-100-100', '201602', '0.71',
'FIN_FC1120-12-164-100-100', '201602', '8.88'
Depending on the month, I only wish to return values from the previous month so I've tried something similar to the above (which falls over with multiple errors).
Can someone unfreeze my brain with the right syntax?
Many thanks as always.