Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alter FUNCTION dbo.auto_rating(@comp_id AS INT)
- RETURNS @tree TABLE
- (
- comp_id int,
- finl_stat varchar(100),
- lgl_stat varchar(100),
- cda_eval varchar(100)
- )
- AS
- BEGIN
- with aaa(finl_stat,lgl_stat,cda_eval)
- as
- (
- exec history..auto_cda_rating 1;
- --select companyid,cdastatus,hasmarketingdata from dmain where companyid=6370
- )
- insert into @tree
- select 1,* from aaa;
- RETURN
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement