Viewing 15 posts - 8,611 through 8,625 (of 8,730 total)
I've seen that too, but also, I've seen that what seems a simple sintax problem is just the tip of the iceberg and the real problem needs sample data and...
August 10, 2012 at 8:19 am
I might be thinking outloud and it could be even more work, but is an idea.
Could you use a stored procedure that will assign all those values to output parameters?...
August 10, 2012 at 7:01 am
Why would you want to add a column in a stored procedure?
That won't be reusable.
August 9, 2012 at 2:18 pm
joshphillips7145 (8/9/2012)
Select course1.Ref_Number, course1.enrollment
From course As course1 JOIN Course As course2
ON course1.Ref_Number = course2.Ref_Number
Group by course1.Ref_Number,...
August 9, 2012 at 2:11 pm
You cannot accomplish that using a self join as you did.
The only way I figure it out, would be with a derived table.
SELECT course1.Ref_Number, course1.enrollment
FROM Course As course1
JOIN (SELECT...
August 9, 2012 at 2:03 pm
I don't understand the problem, but I believe you don't need multiple aliases.
Can you explain in more detail and give the exact problem? Or what do you mean by this:
Problem...
August 9, 2012 at 12:34 pm
No, you're still putting the subquery in the field list.
Put it in the WHERE clause where you can compare the result of the subquery to your field and filter...
August 9, 2012 at 12:10 pm
The subquery should be on the WHERE clause.
Remember you're trying to compare a value against the average to filter information.
Do you need more tips? Can you change your query?
EDIT: You...
August 9, 2012 at 12:01 pm
Now, this is very weird behavior.
Correct answers: 98% (414)
Incorrect answers: 2% (10)
Total attempts: 424
--------------------------------------------------------------------------------
1.INSTEAD OF triggers, AFTER triggers, constraints 6%
--------------------------------------------------------------------------------
2.INSTEAD OF triggers, constraints, BEFORE...
August 9, 2012 at 9:28 am
Another option, could be
SELECT ISNULL(NULLIF(fm_clinum, '') + CHAR(10), '') +
ISNULL(NULLIF(fm_contac, '') + CHAR(10), '')
...
FROM...
August 9, 2012 at 8:18 am
That was my first thought Sean, but he wanted to identify the empty strings to avoid additional lines.
August 9, 2012 at 8:12 am
Maybe you could use a DDL trigger or Policy-Based Management.
August 9, 2012 at 8:00 am
If you validate your blanks with LEN(field) > 0, you don't need to worry about the nulls.
SELECT CASE WHEN LEN(fm_clinum) > 0 THEN fm_clinum + CHAR(10) ELSE '' END +
...
August 9, 2012 at 7:42 am
Viewing 15 posts - 8,611 through 8,625 (of 8,730 total)