I have two sets of tables - one has yearly data and another has monthly data. The only difference between the two is the additional month column in the latter. I have a bunch of stored procedures that manipulate the data and create resulting tables.I modified the SPs to accept a parameter 'M' or 'Y' to run accordingly. if @prd = 'Y' begin --year -- logic that create temp tables. end else begin --month @prd=M -- logic endThe two logic have only one difference - month column. But at run time, I get an error about the month field even though I am running for year.The temp table names for both are the same. Is this allowed? What am I doing wrong? Any help would be awesome. Thanks.
↧