Hey guys -
It's become my job to decipher dozens (prob close to 100) of SPs written by a dozen different developers. Of course nothing is documented and that's where I come in.
One SP has these couple of lines.....
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'TableA')
DROP TABLE TableA
Select Distinct FieldNameA
Insert Into TableA(FieldNameA)
Values ('* All')
OK. So it seems Table A is dropped, recreated with fresh daily data and then repopulated with Distinct values from Table B.
But what does the bolded text do??