Viewing 15 posts - 16,876 through 16,890 (of 18,923 total)
Not sure that distinct will work without a group by... this may work better :
Select Week_number, sum(Total) from dbo.YourTable group by week_number
BTW, why r u keeping the week number...
June 13, 2005 at 11:27 am
Declare @Output as datetime
set @Output = '2005-06-13'
exec TrendPeakTotal '11', '2000-01-01', @Output output
Select @Output
June 13, 2005 at 11:23 am
You tell me. I can't see what's the result of the execution.
June 13, 2005 at 11:19 am
Create proc .... @UpdateDate output = GetDate()
then supply a null value when you create this parameter... You should be fine this fine.
June 13, 2005 at 10:12 am
The temp table #Test must be created before you can run this code.
Did you copy our exemples exactly?
Did you forget to swap the table names?
June 13, 2005 at 9:54 am
Also note that it's a best pratice to always specify the target columns.
June 13, 2005 at 9:53 am
Insert into #mat_samples (col1, col2, id) select col1, col2, id from mat_sample where...
June 13, 2005 at 9:51 am
Anybody wanna suggest another approach than dynamic sql to this problem??
June 13, 2005 at 9:49 am
We can't provide a solution when none exists... we often have to resort to such workarounds.
June 13, 2005 at 9:30 am
I've never found any way around that. At least the default still works and once it's coded you don't have any more work to do.
June 13, 2005 at 9:22 am
It's already been posted in the previous messages... even if it's not crystal clear
.
June 13, 2005 at 9:18 am
It's not the same behavior with functions... you must specify that you want the default parameter, like this :
Select * from dbo.Fn_myDate(default)
June 13, 2005 at 9:06 am
Can you run the profiler and see what query is ran when that happens?
June 13, 2005 at 8:09 am
Nothing... I thaught you still needed help.
Nice work.
June 13, 2005 at 8:01 am
Viewing 15 posts - 16,876 through 16,890 (of 18,923 total)