• I recommend taking a step back and trying to analyze your solution a little more in depth.

    From what I can tell, based on your DB name, ConstarOLAP_PROPHIX_FactDb, you are creating some type of data warehouse. My hunch is this is a proc you want to run nightly and refresh a table in this DB. Presumably some reports down the line use this table for some calculations and it changes everyday.

    To answer your specific question, the proc is attempting to create the table every time its run, you can't have multiple objects with the same name.

    Syntactically, to achieve your solution, you would have to execute a drop table command prior to the create table command in your proc.

    drop table tblPlexActualPrice

    or you can create the table outside the proc and issue a truncate table command prior to your insert.

    truncate table tblPlexActualPrice

    I do not advocate either of the above, but it would work. A better solution would be to create and populate your tblPlexActualPrice table with pricing data constrained by a date value, to give you what actual pricing was on any given day. Your procedure should then only run inserts of daily changes to this table to keep it current. Any reports or queries will need to be constrained by the date value.

    It would help us as well if you could tell us what you are ultimately trying to accomplish. Often times we get lost in the search for how to make something work vs. what is a better way...