Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
this gives me an error
IF @ID =1 BEGIN select field1 INTO #tmpCurrent FROM TABLE1 END ELSE IF @ID = 2 BEGIN select field1, field2 INTO #tmpCurrent FROM TABLE2 END