title: How i change this statement to dynamic SQL?
body: <p>I trying to change this to be dynamic but I stuck at the set of data..<br />
  Example, the statement </p>
  
  <p>SELECT * FROM A<br />
  WHERE id IN (1,2)</p>
  
  <p>and also 1,2 come from <br />
  SELECT id FROM B <br />
  WHERE type='%xxx%' </p>
  
  <p>Statement above can return many number <br />
  I try to declare @id but I have no idea</p>
  
  <p>So, Have any idea? <br />
  Thank you for suggestion :)</p>