Viewing 6 posts - 1 through 6 (of 6 total)
Why don't you try to add an identity column?
For best performance make it a clustered primary key.
September 22, 2004 at 7:44 am
I used your example in the code bellow and it seems to work fine. Few suggestions:
- Write static SQL first to make it work (I had problems with...
August 10, 2004 at 8:33 am
You have 2 options (at least) here:
1. Rewrite your function as SP so you can use INSERT INTO
2. Rewrite function to return table (single row in this case) so you can...
August 4, 2004 at 8:59 am
It should work (in this case) if you use OUTER JOIN in the view. (I assume that join expression t1.emp_num = t2.emp_name is a typo and should be t1.emp_num =...
August 4, 2004 at 8:17 am
- Wach out for the code used in sub-SPs
IF @ReturnVal = NULL SET @ReturnVal = 0
use IF @ReturnVal IS NULL SET @ReturnVal = 0 or SET @ReturnVal = ISNULL(@ReturnVal, 0)
Also,...
August 4, 2004 at 8:00 am
Option 1
Use derived table. Just enclose your main query in parenthesis and use it in a FROM clause of the GROUP BY query. You MUST specify alias for derived table.
SELECT...
August 4, 2004 at 7:42 am
Viewing 6 posts - 1 through 6 (of 6 total)