using temporary tables inside if block with a procedure
In a procedure I wrote, I wanted to allow the flexibility to support various types for a flat-file. This required an IF…ELSE block. Inside the block, the data would be imported, scrubbed, and loaded into a temporary table.