1 Reply Latest reply on Nov 21, 2007 1:49 PM by -==cfSearching==-

    Problem with multiple select statements

    cutie369 Level 1
      I have a stored procedure where I am creating a table variable and then doing an insert and the problem I am having is seperating my select statements that I using to insert in the table variable. I have tried wrapping each select statement in parentheses and seperating them with a comma; however, that does not work either. I also tried aliasing the select statement with the same column name. I am going to using the return on this stored procedure for a charting graphic.

      Here is a SP and below is the error.

      The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.