January 2, 2008 at 12:38 pm
create table #t
(
EmpNo varchar(30),Empdesc varchar(100),Date char(10),Message text
)
insert into #t EXEC spEmpErrors 'Employees','07/01/2005'
select * from #t
drop table #t
when am trying to do that, am getting error.
January 2, 2008 at 12:42 pm
What error are you getting?
Edit: Why not just exec the proc? There's no point to a temp table in the code you posted.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 2, 2008 at 12:57 pm
I guess there's a lot of things it could be, from the number of columns returned by spEmpErrors to the datatypes, to an error in the procedure itself. However, the syntax you show is valid so it seems likely to be either a problem in spEmpErrors or a problem converting the results to the definition you specified for the table #t.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply