on 02-09-2013 10:23 PM
Hi all,
I wonder if it is possible to return the result of a CE-function (in this case a max() aggregation) into a scalar variable instead of a table variable.
It works with SQLScript (select .. into variable..), but using a function could increase the performance.
Any experiences?
Thank you,
Fabian
Hello Fabian,
nope - SELECT INTO is the only way here.
And the performance impact should be rather small, as you're dealing with a single value, aren't you?
In case this is part of a loop-logic or something similar, then it usually pays to spend some time reconsidering if the loop cannot be replaced with a set-approach (and using the CE functions for that).
- Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.