$csv = 'C:\users\m.nielsen\documents\book1.csv'

$csv = import-csv $csv -Header 'num'
$output = foreach($item in $csv) {
    $num = $item.num.substring('308430'.length).trimstart('0')
    $num.substring(0, $num.length-1)
}

"USE AfcCookedIFSV2;
SELECT AU.UserName, 
omi.CardEngravedID,
rc.EnumeratorWording,
BH.ActionDate AS Date
  FROM [AfcCookedIFSV2].[lst].[ObjBlacklistHistory] AS BH
  Inner JOIN cmn.RefConfiguration rc ON rc.EnumeratorKey = bh.BlacklistBlockingReasonID
  Inner JOIN trk.ObjMediaInstance omi ON omi.MediaInstanceID = bh.MediaInstanceID
  Inner JOIN  dbo.aspnet_Users AU ON bh.AgentUserID = au.UserID
  WHERE rc.enumeratordomain LIKE 'BlacklistBlockingReason' AND rc.LanguageCode = 'en-Gb'
  AND omi.CardEngravedID IN ($($output -join ', '))"
