What am I missing? I have a trigger for an insert and that
fires a stored procedure. The stored procedure fails in an
attempt to create a temporary table. The following error
is displayed.
The CREATE TABLE statement is not allowed within a
trigger.
In looking at books online, I do not see this as a illegal
command for a trigger. Is it illegal or is my syntax
invalid?
A section of the stored procedure is provided below.
Thanks in advance for any suggestions.
CREATE PROCEDURE [SP_SEND_SCM_MAIL] AS
BEGIN
CREATE TABLE #texttab (
Item varchar(50),
ItemDescrption varchar(75),
UnitPrice varchar(10),
OrderQty varchar(10),
ItemTotalCost varchar(10))