Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. alter FUNCTION dbo.auto_rating(@comp_id AS INT)
  2. RETURNS @tree TABLE
  3. (
  4. comp_id int,
  5. finl_stat varchar(100),
  6. lgl_stat varchar(100),
  7. cda_eval varchar(100)
  8. )
  9. AS
  10. BEGIN
  11. with aaa(finl_stat,lgl_stat,cda_eval)
  12. as
  13. (
  14. exec history..auto_cda_rating 1;
  15. --select companyid,cdastatus,hasmarketingdata from dmain where companyid=6370
  16. )
  17.  
  18. insert into @tree
  19. select 1,* from aaa;
  20.  
  21. RETURN
  22. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement