Yup, that's fine.
Tell me, what are you trying to accomplish here:
set @CDate =ntile
That's invalid syntax of course. NTILE returns bigint, not date. Also, maybe think up a different alias. It's confusing when you use a built-in function name like ntile for a column alias.