Referencing table within stored procedure

  • Hi,

    I'm attempting to create a crosstab recordset using 2 stored procedures.

    -The first stored procedure creates table A and B using SELECT INTO query to populate these tables.

    -The second stored procedure performs a select on TABLE B to produce it's cross tab output.

    My problem is that my second select into statement in the first stored procedure doesn't see the table created by the first select into statement (when logged in as a normal user). It does however run fine as 'sa' and if you run the 2 select into statements together in Query analyser. The message returned when it fails is 'Invalid object name'. Is this a problem referencing the a table which you have previously just created?

    Any help gratefully received.

    Thanks,

    Stephen

  • This was removed by the editor as SPAM

  • Could you post the SQL?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply