May 5, 2008 at 4:08 am
hi
Is it possible to call a procedure in CTE Functions
example
create procedure CTE1 as
begin
with ct (col1,col2,col3) as
( exec getgl '0040' )
select c.col1,c.col2,c.col3 ,t.col1,t.col2
from ct c inner join table1 t on c.col1=t.col1
end
May 5, 2008 at 5:25 am
[font="Verdana"]CTE is based on anchor member and recursive member, so I think(not sure, even never tried as well), it can not be possible to use the resultset of executed SProc in CTE.
Mahesh[/font]
MH-09-AM-8694
May 5, 2008 at 7:35 am
Use a temp table instead of a CTE for this. CTEs can't have procs in them.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply